Skip to main content

Module slice

Module slice 

Source
Expand description

Trait impls for core slices.

Macrosยง

assert_lengths_eq ๐Ÿ”’
Assert the lengths of the two slices are equal.
assert_size_and_alignment_eq ๐Ÿ”’
Ensure the two provided types have the same size and alignment.
impl_cmov_with_cast ๐Ÿ”’
Implement Cmov and CmovEq traits by casting to a different type that impls the traits.
impl_cmov_with_loop ๐Ÿ”’
Implement Cmov using a simple loop.
impl_cmoveq_with_cast ๐Ÿ”’
Implement CmovEq traits by casting to a different type that impls the traits.
impl_cmoveq_with_loop ๐Ÿ”’
Implement CmovEq using a simple loop.

Constantsยง

WORD_SIZE ๐Ÿ”’

Functionsยง

cast_slice ๐Ÿ”’ โš 
Performs an unsafe pointer cast from one slice type to the other.
cast_slice_mut ๐Ÿ”’ โš 
Performs an unsafe pointer cast from one mutable slice type to the other.
cmovne_remainder ๐Ÿ”’
Compare the two remainder slices by loading a Word then performing cmovne.
cmovnz_remainder ๐Ÿ”’
Load the remainder from chunking the slice into a single Word, perform cmovnz, then write the result back out to dst_remainder.
slice_as_chunks ๐Ÿ”’
Rust core [T]::as_chunks vendored because of its 1.88 MSRV. TODO(tarcieri): use upstream function when we bump MSRV
slice_as_chunks_mut ๐Ÿ”’
Rust core [T]::as_chunks_mut vendored because of its 1.88 MSRV. TODO(tarcieri): use upstream function when we bump MSRV
slice_as_chunks_unchecked ๐Ÿ”’ โš 
Rust core [T]::as_chunks_unchecked vendored because of its 1.88 MSRV. TODO(tarcieri): use upstream function when we bump MSRV
slice_as_chunks_unchecked_mut ๐Ÿ”’ โš 
Rust core [T]::as_chunks_unchecked_mut vendored because of its 1.88 MSRV. TODO(tarcieri): use upstream function when we bump MSRV
slice_to_word ๐Ÿ”’
Create a Word from the given input slice.
word_to_slice ๐Ÿ”’
Serialize Word as bytes using the same byte ordering as slice_to_word.

Type Aliasesยง

Word ๐Ÿ”’