Expand description
const fn
equivalents of slice methods.
§Removed in 0.3.0
These functions were removed in 0.3.0 because there is an equivalent const fn in the standard library:
first
last
split_first
split_last
Modules§
- cmp
cmp
const fn
s for comparing slices for equality and ordering.
Macros§
- Macro equivalent of
<[&[T]]>::concat
, which takes a constant as an argument.
Structs§
- ArrayChunks
iter
Const equivalent ofcore::slice::ArrayChunks
- ArrayChunksRev
iter
Const equivalent ofcore::iter::Rev<core::slice::ArrayChunks>
- Chunks
iter
Const equivalent ofcore::slice::Chunks
- ChunksExact
iter
Const equivalent ofcore::slice::ChunksExact
- ChunksExactRev
iter
Const equivalent ofcore::iter::Rev<core::slice::ChunksExact>
- ChunksRev
iter
Const equivalent ofcore::iter::Rev<core::slice::Chunks>
- Iter
iter
Const equivalent ofcore::slice::Iter
. - IterCopied
iter
A const equivalent ofiter::Copied<slice::Iter<'a, T>>
. - IterCopiedRev
iter
A const equivalent ofiter::Rev<iter::Copied<slice::Iter<'a, T>>>
- IterRev
iter
Const equivalent ofcore::iter::Rev<core::slice::Iter<_>>
- RChunks
iter
Const equivalent ofcore::slice::RChunks
- RChunksExact
iter
Const equivalent ofcore::slice::RChunksExact
- RChunksExactRev
iter
Const equivalent ofcore::iter::Rev<core::slice::RChunksExact>
- RChunksRev
iter
Const equivalent ofcore::iter::Rev<core::slice::RChunks>
- The error produced by trying to convert from
&[T]
to&[T; N]
, or from&mut [T]
to&mut [T; N]
. - Windows
iter
Const equivalent ofcore::slice::Windows
- WindowsRev
iter
Const equivalent ofcore::iter::Rev<core::slice::Windows>
Traits§
- A byte slice pattern.
Functions§
- array_chunks
iter
Const equivalent of<[T]>::array_chunks
- Const equivalent of
<[T]>::as_chunks
- Const equivalent of
<[T]>::as_rchunks
- Whether
pattern
is insideleft
. - Whether
pattern
is the end ofleft
. - Finds the byte offset of
pattern
inleft
. - Advances
this
up to the first instance ofneedle
. - Advances
this
past the first instance ofneedle
. - Returns whether
pattern
is contained insideleft
, searching in reverse. - Finds the byte offset of
pattern
insideleft
, searching in reverse. - Truncates
this
to the last instance ofneedle
. - Truncates
this
to before the last instance ofneedle
. - Whether
pattern
is the start ofleft
. - Remove
prefix
from the start ofleft
. - Remove
suffix
from the end ofleft
. - 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 ofthis
. - Removes all instances of
needle
from the start and end ofthis
. - Removes ascii whitespace from the start of
this
. - Removes all instances of
needle
from the start ofthis
. - chunks
iter
Const equivalent of<[T]>::chunks
- chunks_exact
iter
Const equivalent of<[T]>::chunks_exact
- Compares two
&[u8]
, returning the order ofleft
relative toright
. - Compares two
Option<&'a [u8]>
, returning the ordering ofleft
relative toright
. - Compares two
&[u8]
for equality. - Compares two
Option<&'a [u8]>
for equality. - first_mut
mut_refs
ornightly_mut_refs
A const equivalent of<[T]>::first_mut
- A const equivalent of
slice.get(index)
- A const equivalent of
slice.get(start..)
. - get_from_mut
mut_refs
ornightly_mut_refs
A const equivalent ofslice.get_mut(start..)
. - get_mut
mut_refs
ornightly_mut_refs
A const equivalent ofslice.get_mut(index)
- A const equivalent of
slice.get(start..end)
. - get_range_mut
mut_refs
ornightly_mut_refs
A const equivalent ofslice.get_mut(start..end)
. - A const equivalent of
slice.get(..len)
. - get_up_to_mut
mut_refs
ornightly_mut_refs
A const equivalent ofslice.get_mut(..len)
. - iter
iter
Gets a const iterator overslice
, const equivalent of<[T]>::iter
- iter_copied
iter
A const equivalent ofslice.iter().copied()
- last_mut
mut_refs
ornightly_mut_refs
A const equivalent of<[T]>::last_mut
- rchunks
iter
Const equivalent of<[T]>::rchunks
- rchunks_exact
iter
Const equivalent of<[T]>::rchunks_exact
- A const equivalent of
&slice[start..]
. - slice_from_mut
mut_refs
ornightly_mut_refs
A const equivalent of&mut slice[start..]
. - A const equivalent of
&slice[start..end]
. - slice_range_mut
mut_refs
ornightly_mut_refs
A const equivalent of&mut slice[start..end]
. - A const equivalent of
&slice[..len]
. - slice_up_to_mut
mut_refs
ornightly_mut_refs
A const equivalent of&mut slice[..len]
. - A const equivalent of
<[T]>::split_at
- split_at_mut
mut_refs
A const equivalent of<[T]>::split_at_mut
- split_first_mut
mut_refs
ornightly_mut_refs
A const equivalent of<[T]>::split_first_mut
- split_last_mut
mut_refs
ornightly_mut_refs
A const equivalent of<[T]>::split_last_mut
- Tries to convert from
&[T]
to&[T; N]
. - try_into_array_mut
mut_refs
ornightly_mut_refs
Tries to convert from&mut [T]
to&mut [T; N]
. - windows
iter
Const equivalent of<[T]>::windows