Type Alias style::str::StaticCharVec
source · pub type StaticCharVec = &'static [char];
Expand description
A static slice of characters.
Trait Implementations§
source§impl<T, E, F> EncodeAsVarULE<VarZeroSlice<T, F>> for &[E]where
T: VarULE + ?Sized,
E: EncodeAsVarULE<T>,
F: VarZeroVecFormat,
impl<T, E, F> EncodeAsVarULE<VarZeroSlice<T, F>> for &[E]where T: VarULE + ?Sized, E: EncodeAsVarULE<T>, F: VarZeroVecFormat,
source§fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
Calls
cb
with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T
. Read moresource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesource§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
Write the corresponding
VarULE
type to the dst
buffer. dst
should
be the size of Self::encode_var_ule_len()
source§impl<T> EncodeAsVarULE<ZeroSlice<T>> for &[T]where
T: AsULE + 'static,
impl<T> EncodeAsVarULE<ZeroSlice<T>> for &[T]where T: AsULE + 'static,
source§fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
fn encode_var_ule_as_slices<R>(&self, _: impl FnOnce(&[&[u8]]) -> R) -> R
Calls
cb
with a piecewise list of byte slices that when concatenated
produce the memory pattern of the corresponding instance of T
. Read moresource§fn encode_var_ule_len(&self) -> usize
fn encode_var_ule_len(&self) -> usize
Return the length, in bytes, of the corresponding
VarULE
typesource§fn encode_var_ule_write(&self, dst: &mut [u8])
fn encode_var_ule_write(&self, dst: &mut [u8])
Write the corresponding
VarULE
type to the dst
buffer. dst
should
be the size of Self::encode_var_ule_len()
1.0.0 · source§impl<'a, T> IntoIterator for &'a [T]
impl<'a, T> IntoIterator for &'a [T]
source§impl<'data, T> IntoParallelIterator for &'data [T]where
T: Sync + 'data,
impl<'data, T> IntoParallelIterator for &'data [T]where T: Sync + 'data,
1.46.0 · source§impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,
source§impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where
A: Allocator,
T: PartialEq<U>,
impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,
source§impl<'a, 'b> Pattern<'a> for &'b [char]
impl<'a, 'b> Pattern<'a> for &'b [char]
Searches for chars that are equal to any of the char
s in the slice.
Examples
assert_eq!("Hello world".find(&['l', 'l'] as &[_]), Some(2));
assert_eq!("Hello world".find(&['l', 'l'][..]), Some(2));
§type Searcher = CharSliceSearcher<'a, 'b>
type Searcher = CharSliceSearcher<'a, 'b>
🔬This is a nightly-only experimental API. (
pattern
)Associated searcher for this pattern
source§fn into_searcher(self, haystack: &'a str) -> CharSliceSearcher<'a, 'b>
fn into_searcher(self, haystack: &'a str) -> CharSliceSearcher<'a, 'b>
🔬This is a nightly-only experimental API. (
pattern
)Constructs the associated searcher from
self
and the haystack
to search in.source§fn is_contained_in(self, haystack: &'a str) -> bool
fn is_contained_in(self, haystack: &'a str) -> bool
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches anywhere in the haystack
source§fn is_prefix_of(self, haystack: &'a str) -> bool
fn is_prefix_of(self, haystack: &'a str) -> bool
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches at the front of the haystack
source§fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>
fn strip_prefix_of(self, haystack: &'a str) -> Option<&'a str>
🔬This is a nightly-only experimental API. (
pattern
)Removes the pattern from the front of haystack, if it matches.
source§fn is_suffix_of(self, haystack: &'a str) -> boolwhere
CharSliceSearcher<'a, 'b>: ReverseSearcher<'a>,
fn is_suffix_of(self, haystack: &'a str) -> boolwhere CharSliceSearcher<'a, 'b>: ReverseSearcher<'a>,
🔬This is a nightly-only experimental API. (
pattern
)Checks whether the pattern matches at the back of the haystack
source§fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>where
CharSliceSearcher<'a, 'b>: ReverseSearcher<'a>,
fn strip_suffix_of(self, haystack: &'a str) -> Option<&'a str>where CharSliceSearcher<'a, 'b>: ReverseSearcher<'a>,
🔬This is a nightly-only experimental API. (
pattern
)Removes the pattern from the back of haystack, if it matches.