lettre.rs
...smtp_password".to_owned()); // Open a remote connection to gmail let mailer = SmtpTransport::relay("smtp.gmail.com") .unwrap() .credentials(creds) .build(); // Send the email match mailer.send(&email) { Ok(_) => println!("Email sent successfully!"), Err(e) => panic!("Could not send email: {e:?}"), } } Not sure of which connect options to use? Clone...
Crate
v0.11.23
2026-08-03
crates.io
...io::AsyncRead let mut reader = AsyncReader::new(reader); // we expect the first event to be the XML declaration let ev = reader.read().await; assert!(matches!(ev.unwrap().unwrap(), Event::XmlDeclaration(_, XmlVersion::V1_0))); # }) Feature flags macros : Enable macros to convert &str to &NameStr and &NcNameStr , respectively. compact_str (default): Enable...
Crate
v0.14.0
2026-02-21
crates.io
...let iter = [1, 2, 3].into_iter(); match iter.collect() { ArrayFromIter(Some([a, b, c])) => println!("exactly 3 elements: {a}, {b}, {c}"), ArrayFromIter(None) => println!("not 3 elements"), } UnarrayArrayExt extension trait // mapping an array via a `Result` let strings = ["123", "234"]; let numbers = strings.map_result(|s| s.parse()); assert...
Crate
v0.1.4
2022-11-30
docs.rs
...flattening of structs into maps 2 While data structures with any of these attributes should generally roundtrip through RON, some restrictions apply 3 and their textual representation may not always match your expectation: ron only supports string keys inside maps flattened into structs internally (or adjacently) tagged or untagged enum...
Crate
v0.12.2
2026-06-22
crates.io
...Example use utf8::{decode, DecodeError}; let bytes = b"Hello\xC0World"; match decode(bytes) { Ok(s) => println!("valid: {s}"), Err(DecodeError::Invalid { valid_prefix, invalid_sequence, remaining_input }) => { // valid_prefix = "Hello", invalid_sequence = [0xC0], remaining_input = b"World" println!("got {:?} before error", valid_prefix); } Err(DecodeError::Incomplete { valid_prefix, incomplete_suffix...
Crate
v0.8.1
2026-02-28
docs.rs
...Unit case This will return true if enum's variant matches the expected type use enum_as_inner::EnumAsInner; #[derive(EnumAsInner)] enum UnitVariants { Zero, One, Two, } let unit = UnitVariants::Two; assert!(unit.is_two()); Mutliple, unnamed field case This will return a tuple of the inner types: use enum_as...
Crate
v0.7.0
2026-02-02
docs.rs
...You can now match directly on the event object type. use stripe_webhook::{Event, EventObject, Webhook}; fn handle_webhook(payload: &str, sig: &str, secret: &str) { let event = Webhook::construct_event(payload, sig, secret).unwrap(); match event.data.object { EventObject::CheckoutSessionCompleted(session) => { println!("Received checkout session completed webhook with id: {:?}", session...
Crate
v1.0.0-rc.8
2026-08-05
crates.io
...Add this to your Cargo.toml : [dependencies] exr = "1.74.2" # also, optionally add this to your crate for smaller binary size # and better runtime performance [profile.release] lto = true The master branch of this repository always matches the crates.io version, so you could also link the github repository...
Crate
v1.74.2
2026-07-10
crates.io
...Data returned by the parser may not match the data used by a loader. Non-intrusive fixes (low complexity or overhead) for these are welcome, but it is not a focus of development. Minimum supported Rust version (MSRV) Changes to MSRV are not considered breaking changes. We are conservative about...
Crate
v0.40.0
2026-08-01
docs.rs
...target features with an asterisk are unstable (nightly-only) and subject to change to match upstream name changes in the Rust standard library. aarch64 Linux, iOS, and macOS/ARM only (ARM64 does not support OS-independent feature detection) Target features: aes * sha2 * sha3 * loongarch64 Linux only ( loongarch64 does not support...
Crate
v0.3.0
2026-02-05
docs.rs
...Through pattern matching and conservative estimation, it recognizes and weighs 30k common passwords, common names and surnames according to US census data, popular English words from Wikipedia and US television and movies, and other common patterns like dates, repeats ( aaa ), sequences ( abcd ), keyboard patterns ( qwertyuiop ), and l33t speak. Consider using...
Crate
v3.1.1
2026-04-24
crates.io
...Leading directories will be stripped from the file name allowing the use of subdirectories in the S3 bucket, and any file not matching the format, or not matching the provided prefix string, will be ignored. use self_update::cargo_crate_version; fn update() -> Result<(), Box<dyn ::std::error::Error>> { let...
Crate
v1.0.0-rc.6
2026-07-16
docs.rs
...However, as this crate is almost soley reliable on the zbus crate, we try and match major version releases with theirs to handle breaking changes and move with the wider zbus ecosystem. License Licensed under either of Apache License, Version 2.0, ( LICENSE-APACHE or http://www.apache.org/licenses...
Crate
v5.1.0
2025-09-03
ssheldon.github.io
...This crate can take advantage of these encodings to verify that the types used in Rust match the types encoded for the method. To use this functionality, enable the "verify_message" feature. With this feature enabled, type checking is performed for every message send, which also requires that all arguments...
Crate
v0.2.7
2019-10-18
projectfluent.org
...The language negotiation strategies aim to replicate the best-effort matches with the most limited amount of data. The algorithm returns reasonable results without any database, but the results can be improved with either limited or full CLDR likely-subtags database. The result is a balance chosen for Project Fluent...
Crate
v0.13.1
2025-10-24
crates.io
...Alternatives instant is a popular alternative! However the API it implements doesn't match std::time exactly. Changelog See the CHANGELOG file for details. Contributing See the CONTRIBUTING file for details. Attribution Inspiration was taken from the instant project. Additional insight was taken from the time project. License Licensed under...
Crate
v1.1.0
2024-03-01
datafusion.apache.org
...regular expression functions, such as regexp_match unicode_expressions : include Unicode-aware functions such as character_length unparser : enables support to reverse LogicalPlans back into SQL recursive_protection : uses recursive for stack overflow protection. Optional features: avro : support for reading the Apache Avro format backtrace : include backtrace information in error...
Crate
v55.0.0
2026-08-18
docs.rs
...headers() .await?.into_iter() .filter(|h| *h != "region") ).await?; let mut records = rdr.records(); while let Some(record) = records.next().await { let record = record?; match record.get(1) { Some(reg) if reg == region => wri.write_record(record .iter() .enumerate() .filter(|(i, _)| *i != 1) .map(|(_, s)| s) ).await?, _ => {}, } } Ok(()) } fn main...
Crate
v1.3.1
2025-05-15
crates.io
...Platform specific intrinsics help get speed up intensive operations ensuring we can almost match libjpeg-turbo speeds but speeds are always +- 10 ms of this library. For more up-to-date benchmarks, see the online repo with benchmarks here
Crate
v0.5.16-rc1
2026-08-07
docs.rs
...js_error_wrapper!(std::net::AddrParseError, JsAddrParseError, "TypeError"); js_error_wrapper!(std::net::AddrParseError, JsAddrParseError, |err| { // match or do some logic to get the error class }); Additionally, this crate provides some features which related to some commonly used crates in Deno, which implements the JsErrorClass trait on some of their...
Crate
v0.7.2
2025-12-09