karyon_core

Module util

Source
Expand description

A set of helper tools and functions.

Modulesยง

Functionsยง

  • Decodes a given type T from the given slice. returns the decoded value along with the number of bytes read.
  • Encode the given type T into a Vec<u8>.
  • Encode the given type T into the given slice..
  • Returns the userโ€™s home directory as a PathBuf.
  • Generates and returns a random u16 using rand::rngs::OsRng.
  • Generates and returns a random u32 using rand::rngs::OsRng.
  • Generates and returns a random u64 using rand::rngs::OsRng.
  • Expands a tilde (~) in a path and returns the expanded PathBuf.