www.fluvio.io
...If version is dev, Kubernetes will expect an image in its local registry with a name matching the pattern infinyon/fluvio-connect-<your connector name>:latest.
Otherwise, the value of version will refer to the image tag to pull from Docker Hub.
e.g.
infinyon/fluvio-connect-<your connector name...
Project/Tooling Updates
2022-02-09
~1 min read
blog.yoshuawuyts.com
Async Cancellation I— 2021-11-10
tasks and futures
cancelling futures
cancelling tasks
propagating cancellation for futures
propagating cancellation for tasks
patching cancellation propagation
structured concurrency
cancelling a group of tasks
halt-safety
should tasks be detachable?
an async trait which can't be cancelled?
intermediate matching on cancellation?
defer...
Observations/Thoughts
2021-11-17
~24 min read
quodlibetor.github.io
...new ( ) ; match ( self , other ) { log_syntax ! ( ( & SingleUnitEnum :: One , & SingleUnitEnum :: One ) => { } ) } list } fn assert_equal_field_by_field ( & self , other : & SingleUnitEnum ) { let errs = self . fields_not_equal ( other ) ; if errs . len ( ) > 0 { let mut errmsg = String :: from ( "\n Items are not equal:\n" ) ; for field_err in errs { errmsg . push_str...
News & Blog Posts
2017-01-17
~9 min read
doc.rust-lang.org
pub mod result
...A simple function returning Result might be defined and used like so:
#[derive(Debug)]
enum Version { Version1, Version2 }
fn parse_version(header: &[u8]) -> Result<Version, &'static str> {
match header.get(0) {
None => Err("invalid header length"),
Some(&1) => Ok(Version::Version1),
Some(&2) => Ok(Version::Version2),
Some(_) => Err("invalid version...
module
core
Stable since 1.0.0
Version 1.100.0-nightly
zenoh.io
...This effort has been undertaken for three main reasons:To avoid ambiguity in key expression definition and matching, which before could lead to undefined behaviour.To improve the key expression matcher for better performance.To allow future extensibility to be introduced for more complex matching and behaviours.Briefly, we can...
Project/Tooling Updates
2022-10-19
~8 min read
doc.rust-lang.org
...u8) -> bool {
matches!(n, 0...100) // should be `0..=100`
}
Migrations
If your Rust 2015 or 2018 code does not produce any warnings for bare_trait_objects or ellipsis_inclusive_range_patterns and you've not allowed these lints through the use of #![allow()] or some other mechanism, then there...
The Rust Edition Guide
Book
2024-01-01
~1 min read
gigapotential.dev
...Create a VM
let val = unsafe { hv_vm_create(std::ptr::null_mut()) };
match val {
HV_SUCCESS => println!("HV_SUCCESS: The operation completed successfully."),
HV_ERROR => eprintln!("HV_ERROR: The operation was unsuccessful."),
HV_BUSY => eprintln!(
"HV_BUSY: The operation was unsuccessful because the owning resource was busy."
),
HV_BAD...
Rust Walkthroughs
2026-04-22
~10 min read
sunshowers.io
...break;
}
}
},
recv(signal_receiver) -> internal_event => {
match internal_event {
// internal_event is a Result<SignalEvent, RecvError>.
Ok(event) => InternalEvent::Signal(event),
Err(_) => {
// Ignore the signal thread being dropped. This is done for
// noop signal handlers.
continue;
}
}
},
};
// ... process internal_event
}
If this loop received a test event, it would bubble that...
Observations/Thoughts
2022-10-05
~19 min read
marcobacis.com
...In the previous post, I implemented the policy update in this way:async fn next(&self, _request: &HttpRequest) -> String {
// Read servers list
let servers = &self.servers;
let max_server_idx = servers.len() - 1;
// Update index
let idx = self
.idx
.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |idx| match idx {
x if...
Rust Walkthroughs
2024-06-05
~8 min read
blog.codecentric.de
...While this does not completely match up with all the capabilities of the “init-check-update for loop”, it does very elegantly cover the most common use. More complex cases will need to be written out using while.
Match
1fn match_it(x: Option<i32>, flag: bool) -> i32 {
2 match...
Learn Standard Rust
2020-09-16
~37 min read
dev.to
...The parser splits up spaces per word, and provides them in order within the Vec. (Matched quotes are interpreted as a single word in our situation).
main()
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = ApplicationArguments::from_args();
match args.subcommand {
SubCommand::StartServer(opts) => {
println!("Start the server...
Learn More Rust
2020-08-26
~11 min read
doc.rust-lang.org
...Because there may not be any matching element, select_first returns an Option<ElementRef>. Finally, we use the Option::map method, which lets us work with the item in the Option if it’s present, and do nothing if it isn’t. (We could also use a match expression here...
The Rust Programming Language
Book
2024-02-01
~14 min read
kobzol.github.io
...HashSet<(ObjectName, Ident)>,
}
impl Visitor for CheckNotNullWithoutDefault {
type Break = ();
fn pre_visit_statement(&mut self, statement: &Statement) -> ControlFlow<Self::Break> {
if let Statement::AlterTable {
operations, name, ..
} = statement
{
for op in operations {
match op {
AlterTableOperation::AddColumn { column_def, .. } => {
let has_not_null = column_def
.options
.iter()
.any(|option| option.option == ColumnOption...
Observations/Thoughts
2025-03-26
~6 min read
kerkour.com
...Q, user: &User) -> Result<(), Error> {
const QUERY: &str = "INSERT INTO users (id, email)
VALUES ($1, $2)";
sqlx::query(QUERY)
.bind(user.id)
.bind(&user.email)
.execute(db)
.await
.map_err(|err| match err {
sqlx::Error::Database(db_err) if db_err.constraint().is_some() => Error::EmailAlreadyInUse,
err => Error::Unspecified(format...
Rust Walkthroughs
2025-04-02
~6 min read
forgestream.idverse.com
...true,
})
} else {
None
}
}
fn main() {
let user_id = 12;
match find_user_by_id(user_id) {
Some(user) => match user.get_greetings() {
Ok(message) => println!("{}", message),
Err(err) => println!("Error: {}", err),
},
None => println!("User not found."),
}
}
What is happening is that:
The script will find a user by the id...
Observations/Thoughts
2025-08-06
~4 min read
doc.rust-lang.org
pub fn char_indices(&self) -> CharIndices<'_>
...Some((5, 'y')), char_indices.next());
assert_eq!(Some((6, 'e')), char_indices.next());
assert_eq!(None, char_indices.next());
Remember, chars might not match your intuition about characters:
let yes = "y̆es";
let mut char_indices = yes.char_indices();
assert_eq!(Some((0, 'y')), char_indices.next()); // not (0, 'y̆...
method
core
Stable since 1.0.0
Version 1.100.0-nightly
arXiv
arxiv.org
...We evaluate Forte on mechanism kernels from OpenDP with genuine in-place mutation, matching the library's trusted stability maps with checked constants, covering the constructors that have no proof document, rejecting off-by-one diameters, tightened bounds, miscalibrated releases, and overspent budgets, and deriving one trusted constant as an...
Programming Languages
Chiké Abuah
2026-09-24
arXiv:2609.30254
coaxion.net
...gio::File) -> Result<(), String> { // Try to open the file let (_file, strm) = await!(file.read_async_future(glib::PRIORITY_DEFAULT)) .map_err(|(_file, err)| format!("Failed to open file: {}", err))?; Ok(())}fn main() { [...] let future = async_block! { match await!(read_file(file)) { Ok(()) => (), Err(err) => eprintln!("Got error: {}", err), } l...
News & Blog Posts
2018-04-24
~13 min read
rust-lang.github.io
...The innermost expression that encloses both of these expressions is the match itself (as depicted above), and hence the borrow is considered to extend until the end of the match. Unfortunately, the match encloses not only the Some branch, but also the None branch, and hence when we go to...
RFC 2094
RFC
2017-08-02
~66 min read