Skip to main content

Crate junkdrawer

Crate junkdrawer 

Source
Expand description

A utility crate for rust.

Like your favorite junkdrawer this includes a lot of useful things. The question is just what of this stuff will be useful at what time. Unlike the junkdrawer you can just enable/disable features to make entire groups of things appear/disappear.

This crate is split into multiple modules guarded by their own feature flag. The stuff provided by this crate is all over the place but mostly consists of

  • convenience functions that make code more readable,
  • stuff that is nice to have, exists in nightly, and does not require unstable features,
  • additional datastructures that provide speedups and/or safe memory in certain conditions. However, these faster/memory-efficient implementations require just enough effort to write that it is not worth the hassle. Well, now I wrote them and you can just use them.

ยงModules

These modules (and feature flags) mimic the names of the corresponding modules in std

  • [mod@array]: Some more functions to make working with arrays easier.
  • [mod@collections]: Additional storage functionality and structures.
  • [mod@convert]: Some convenience functions that are nice in iterators and so on.
  • [mod@mem]: Utility functions for (mostly unsafe) memory manipulation.
  • [mod@sync]: A module that contain some utility for working with sync code.
  • [mod@vec]: Additional functions for vectors and an allocation-free vector on the stack (that does not grow dynamically)