Expand description
const fn
equivalents of slice methods.
Macros§
- try_
into_ array - Tries to convert from
&[T]
to&[T; N]
, usable inconst
s, but not inconst fn
s.
Structs§
- Chunks
- Const equivalent of
core::slice::Chunks
- Chunks
Exact - Const equivalent of
core::slice::ChunksExact
- Chunks
Exact Rev - Const equivalent of
core::iter::Rev<core::slice::ChunksExact>
- Chunks
Rev - Const equivalent of
core::iter::Rev<core::slice::Chunks>
- Iter
- Const equivalent of
core::slice::Iter
. - Iter
Copied - A const equivalent of
iter::Copied<slice::Iter<'a, T>>
. - Iter
Copied Rev - A const equivalent of
iter::Rev<iter::Copied<slice::Iter<'a, T>>>
- IterRev
- Const equivalent of
core::iter::Rev<core::slice::Iter<_>>
- TryInto
Array Error - The error produced by trying to convert from
&[T]
to&[T; N]
, or from&mut [T]
to&mut [T; N]
. - Windows
- Const equivalent of
core::slice::Windows
- Windows
Rev - Const equivalent of
core::iter::Rev<core::slice::Windows>
Functions§
- bytes_
contain - Whether
right
is inside&left[from..]
. - bytes_
end_ with - A const equivalent of
<[u8]>::ends_with
- bytes_
find - Finds the byte offset of
right
inleft
, starting from thefrom
index. - bytes_
find_ keep - Advances
this
up to the first instance ofneedle
. - bytes_
find_ skip - Advances
this
past the first instance ofneedle
. - bytes_
rcontain - Returns whether
right
is contained inside&left[..=from]
searching in reverse. - bytes_
rfind - Finds the byte offset of
right
inside&left[..=from]
, searching in reverse. - bytes_
rfind_ keep - Truncates
this
to the last instance ofneedle
. - bytes_
rfind_ skip - Truncates
this
to before the last instance ofneedle
. - bytes_
start_ with - A const equivalent of
<[u8]>::starts_with
- bytes_
strip_ prefix - A const equivalent of
<[u8]>::strip_prefix
- bytes_
strip_ suffix - A const equivalent of
<[u8]>::strip_suffix
- bytes_
trim - Removes ascii whitespace from the start and end of
this
. - bytes_
trim_ end - Removes ascii whitespace from the end of
this
. - bytes_
trim_ end_ matches - Removes all instances of
needle
from the end ofthis
. - bytes_
trim_ matches - Removes all instances of
needle
from the start and end ofthis
. - bytes_
trim_ start - Removes ascii whitespace from the start of
this
. - bytes_
trim_ start_ matches - Removes all instances of
needle
from the start ofthis
. - chunks
- Const equivalent of
<[T]>::chunks
- chunks_
exact - Const equivalent of
<[T]>::chunks_exact
- cmp_
bytes - Compares two
&[u8]
, returning the order ofleft
relative toright
. - cmp_
option_ bytes - Compares two
Option<&'a [u8]>
, returning the ordering ofleft
relative toright
. - eq_
bytes - Compares two
&[u8]
for equality. - eq_
option_ bytes - Compares two
Option<&'a [u8]>
for equality. - first
- A const equivalent of
<[T]>::first
- get
- A const equivalent of
slice.get(index)
- get_
from - A const equivalent of
slice.get(start..)
. - get_
range - A const equivalent of
slice.get(start..end)
. - get_
up_ to - A const equivalent of
slice.get(..len)
. - iter
- Gets a const iterator over
slice
, const equivalent of<[T]>::iter
- iter_
copied - A const equivalent of
slice.iter().copied()
- last
- A const equivalent of
<[T]>::last
- slice_
from - A const equivalent of
&slice[start..]
. - slice_
range - A const equivalent of
&slice[start..end]
. - slice_
up_ to - A const equivalent of
&slice[..len]
. - split_
at - A const equivalent of
<[T]>::split_at
- split_
first - A const equivalent of
<[T]>::split_first
- split_
last - A const equivalent of
<[T]>::split_last
- try_
into_ array - Tries to convert from
&[T]
to&[T; N]
, usable inconst fn
s. Requires the"rust_1_56"
feature. - windows
- Const equivalent of
<[T]>::windows