Module konst::slice[][src]

Expand description

const fn equivalents of slice methods.

Modules

cmpcmp

const fns for comparing slices for equality and ordering.

Macros

Tries to convert from &[T] to &[T; N], usable in consts, but not in const fns.

Structs

The error produced by trying to convert from &[T] to &[T; N], or from &mut [T] to &mut [T; N].

Functions

Whether right is inside &left[from..].

A const equivalent of <[u8]>::ends_with

Finds the byte offset of right inside &left[from..].

Returns whether right is contained inside &left[..=from] searching in reverse.

Finds the byte offset of right inside &left[..=from], searching in reverse.

A const equivalent of <[u8]>::starts_with

A const equivalent of <[u8]>::strip_prefix

A const equivalent of <[u8]>::strip_suffix

Compares two &[u8], returning the order of left relative to right.

Compares two Option<&'a [u8]>, returning the ordering of left relative to right.

Compares two &[u8] for equality.

Compares two Option<&'a [u8]> for equality.

A const equivalent of <[T]>::first

A const equivalent of <[T]>::last

A const equivalent of &slice[start..].

A const equivalent of &slice[start..end].

A const equivalent of &slice[..len].

A const equivalent of <[T]>::split_at

A const equivalent of <[T]>::split_first

A const equivalent of <[T]>::split_last

try_into_arrayderef_raw_in_fn

Tries to convert from &[T] to &[T; N], usable in const fns. Requires Rust nightly.