Expand description
A set of helper tools and functions.
Modulesยง
Functionsยง
- decode
- Decodes a given type
T
from the given slice. returns the decoded value along with the number of bytes read. - encode
- Encode the given type
T
into aVec<u8>
. - encode_
into_ slice - Encode the given type
T
into the given slice.. - home_
dir - Returns the userโs home directory as a
PathBuf
. - random_
16 - Generates and returns a random u16 using
rand::rngs::OsRng
. - random_
32 - Generates and returns a random u32 using
rand::rngs::OsRng
. - random_
64 - Generates and returns a random u64 using
rand::rngs::OsRng
. - tilde_
expand - Expands a tilde (~) in a path and returns the expanded
PathBuf
.