Crate swiss_army_knife[][src]

#linux-support

This library provides wrappers and additional functionality to make use of a panoply of miscellaneous Linux (and, sometimes, POSIX) features.

See https://github.com/lemonrock/linux-support for far more detail.

Modules

big_endian

Big-endian definitions.

bit_set

A set of types to support the use of bit sets in Linux APIs and files.

error_support

Error support.

exponents_of_two

Exponents of 2.

fixed_point_arithmetic

Fixed point arithmetic.

get_unchecked

Allows the use of slice methods get_unchecked() and get_unchecked_mut() such that when compiling with debug assertions access is checked.

hardware_optimized_spin_lock

Spin lock.

hash_map_and_hash_set

Wrappers around the current best choices for a HashMap and HashSet.

intel_hardware_lock_elision

Intel hardware lock elision.

internet_protocol

Internet protocol.

non_zero

Non zero numerics support.

path

Path utilities.

random

Random.

split

Split performance utilities.

sse2

SSE2 support, including functions one might assume to be present as intrinsics provided by Intel but aren’t.

strings

String utilities.

time

Time utilities.

unsafe_initialization

Unsafe initialization of memory.

Macros

bit_set

Creates a BitSet.

bit_set_aware

Bit set aware.

fast_secure_hash_map

Create a FastSecureHashMap from a list of key-value pairs.

fast_secure_hash_set

Create a FastSecureHashSet from a list of elements.

Structs

ConstArrayVec

Layout-compatible with ArrayVec.

StaticInitializedOnce

A wrapper type to use with mutable static fields where one does not want the overhead and inflexibility of lazy_static!.

VariablySized

Wrapper for variably sized data.

Traits

LoadNonAtomically

Loads an Atomic* (eg AtomicU8) non-atomically without any synchronization.

Functions

move_to_front_of_vec

Forcing the constraint of T: Copy ensures that we do not need to drop the discarded values (Copy is incompatible with Drop).

unreachable_code

Unreachable code.

unreachable_code_const

Unreachable code, suitable for constant functions.