Module konst::slice [−][src]
Expand description
const fn
equivalents of slice methods.
Modules
cmp
const fn
s for comparing slices for equality and ordering.
Macros
Tries to convert from &[T]
to &[T; N]
, usable in const
s, but not in const fn
s.
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
in left
, starting from the from
index.
Advances this
up to the first instance of needle
.
Advances this
past the first instance of needle
.
Returns whether right
is contained inside &left[..=from]
searching in reverse.
Finds the byte offset of right
inside &left[..=from]
, searching in reverse.
Truncates this
to the last instance of needle
.
Truncates this
to before the last instance of needle
.
A const equivalent of
<[u8]>::starts_with
A const equivalent of
<[u8]>::strip_prefix
A const equivalent of
<[u8]>::strip_suffix
Removes ascii whitespace from the start and end of this
.
Removes ascii whitespace from the end of this
.
Removes all instances of needle
from the end of this
.
Removes all instances of needle
from the start and end of this
.
Removes ascii whitespace from the start of this
.
Removes all instances of needle
from the start of this
.
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
mut_refs
or nightly_mut_refs
A const equivalent of
<[T]>::first_mut
A const equivalent of slice.get(index)
A const equivalent of slice.get(start..)
.
mut_refs
or nightly_mut_refs
A const equivalent of slice.get_mut(start..)
.
mut_refs
or nightly_mut_refs
A const equivalent of slice.get_mut(index)
A const equivalent of slice.get(start..end)
.
mut_refs
or nightly_mut_refs
A const equivalent of slice.get_mut(start..end)
.
A const equivalent of slice.get(..len)
.
mut_refs
or nightly_mut_refs
A const equivalent of slice.get_mut(..len)
.
A const equivalent of
<[T]>::last
mut_refs
or nightly_mut_refs
A const equivalent of
<[T]>::last_mut
A const equivalent of &slice[start..]
.
mut_refs
or nightly_mut_refs
A const equivalent of &mut slice[start..]
.
A const equivalent of &slice[start..end]
.
mut_refs
or nightly_mut_refs
A const equivalent of &mut slice[start..end]
.
A const equivalent of &slice[..len]
.
mut_refs
or nightly_mut_refs
A const equivalent of &mut slice[..len]
.
A const equivalent of
<[T]>::split_at
mut_refs
and constant_time_slice
A const equivalent of
<[T]>::split_at_mut
A const equivalent of
<[T]>::split_first
mut_refs
or nightly_mut_refs
A const equivalent of
<[T]>::split_first_mut
A const equivalent of
<[T]>::split_last
mut_refs
or nightly_mut_refs
A const equivalent of
<[T]>::split_last_mut
rust_1_56
Tries to convert from &[T]
to &[T; N]
, usable in const fn
s.
Requires the "rust_1_56"
feature.
mut_refs
or nightly_mut_refs
Tries to convert from &mut [T]
to &mut [T; N]
.