Crate odds

Source
Expand description

Odds and ends — collection miscellania.

  • Utilities for debug-checked, release-unchecked indexing and slicing
  • Fixpoint combinator for closures
  • String and Vec extensions

The odds crate has the following crate feature flags:

  • std-vec
    • Enable Vec extensions
    • Implies std
  • std-string
    • Enable String extensions
    • Implies std
  • std
    • Enable basic libstd usage.
  • unstable.
    • Optional.
    • Requires nightly channel.
    • Implement the closure traits for Fix.

If none of the std features are enabled (they are not enabled by default), then the crate is no_std.

§Rust Version

This version of the crate requires Rust 1.15 or later.

Modules§

char
Extra functions for char
prelude
prelude of often used traits and functions
slice
Extra functions for slices
stride
Slice iterator with custom step size
string
Extensions to &str and String
vec
Extensions to Vec

Structs§

Fix
Fixpoint combinator for rust closures, generalized over the return type.

Traits§

IndexRange
IndexRange is implemented by Rust’s built-in range types, produced by range syntax like .., a.., ..b or c..d.

Functions§

debug_assert_unreachable
Act as debug_assert! in debug mode, asserting that this point is not reached.
fix
Fixpoint combinator for rust closures, generalized over the return type.
raw_byte_repr
Safe to use with any wholly initialized memory ptr
ref_slice
Create a length 1 slice out of a reference
ref_slice_mut
Create a length 1 mutable slice out of a reference