[][src]Crate lokacore

Lokathor's crate of core-only odds and ends.

Modules

arch

Architecture specific functionality, safe wrapped.

Macros

branchless_abs

The wrapping absolute value of any signed integer.

branchless_max

The maximum of two integer values.

branchless_min

The minimum of two integer values.

shuffle128

Shuffles around some f32 lanes into a new m128

shuffle128d

Shuffles around some f64 lanes into a new m128

Structs

Align2

Wrap the inner value to a minimum of 2.

Align4

Wrap the inner value to a minimum of 4.

Align8

Wrap the inner value to a minimum of 8.

Align16

Wrap the inner value to a minimum of 16.

Align32

Wrap the inner value to a minimum of 32.

Enums

PodCastError

The things that can go wrong when casting between Pod data forms.

Traits

Pod

Marker trait for "plain old data".

Zeroable

Marker trait for types that can be safely made with zeroed.

Functions

bytes_of

Re-interprets &T as &[u8].

bytes_of_mut

Re-interprets &mut T as &mut [u8].

cast

As try_cast, but unwraps the result for you.

cast_mut

As try_cast_mut, but unwraps the result for you.

cast_ref

As try_cast_ref, but unwraps the result for you.

cast_slice

As try_cast_slice, but unwraps the result for you.

cast_slice_mut

As try_cast_slice_mut, but unwraps the result for you.

try_cast

Try to cast T into U.

try_cast_mut

As try_cast_ref, but mut.

try_cast_ref

Try to convert a &T into &U.

try_cast_slice

Try to convert &[T] into &[U] (possibly with a change in length).

try_cast_slice_mut

As try_cast_slice, but mut.