How Do I … in Rust?
Discovery
… find a crate for a given purpose?
… find the latest version of a crate?
Project organization
… organize a Rust workspace?
Conveniences
… define "extension" methods on a type in another crate?
… guarantee a trait is object-safe?
static_assertions::assert_obj_safe!(MyTrait);
Error handling and debugging
… handle errors simply and correctly?
… structure errors in a public API?
… set up basic logging?
Collections
… create a fast HashMap
?
… convert from slices to fixed-length arrays?
Numerics
… convert between numeric types ideomatically?
… perform math ideomatically?
… convert between ints and bytes?
Encoding, serialization, parsing
… serialize to and from JSON?
… decide what format to use with serde
?
Time
… parse and render standard time formats?
Random numbers
… generate a strong random number?
… generate a strong random number from a seed?
… generate a fast random number from a seed?
Cryptography
… calculate a cryptographic content hash?
Parallelism and Concurrency
… initialize a global value?
todo LazyLock
, OnceLock
, and Once
.
… send messages to/from async code?
todo futures::channels