Type Alias style::str::StaticCharVec

source ·
pub type StaticCharVec = &'static [char];
Expand description

A static slice of characters.

Trait Implementations§

source§

impl<T> AsRef<ZeroSlice<T>> for &[<T as AsULE>::ULE]where T: AsULE,

source§

fn as_ref(&self) -> &ZeroSlice<T>

Converts this type into a shared reference of the (usually inferred) input type.
1.0.0 · source§

impl<T> Default for &[T]

source§

fn default() -> &[T]

Creates an empty slice.

source§

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

Calls cb with a piecewise list of byte slices that when concatenated produce the memory pattern of the corresponding instance of T. Read more
source§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding VarULE type
source§

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,

source§

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 more
source§

fn encode_var_ule_len(&self) -> usize

Return the length, in bytes, of the corresponding VarULE type
source§

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]

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, T>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Iter<'a, T>

Creates an iterator from a value. Read more
source§

impl<'data, T> IntoParallelIterator for &'data [T]where T: Sync + 'data,

§

type Item = &'data T

The type of item that the parallel iterator will produce.
§

type Iter = Iter<'data, T>

The parallel iterator type that will be created.
source§

fn into_par_iter(self) -> <&'data [T] as IntoParallelIterator>::Iter

Converts self into a parallel iterator. Read more
1.0.0 · source§

impl<A, B, const N: usize> PartialEq<[A; N]> for &[B]where B: PartialEq<A>,

source§

fn eq(&self, other: &[A; N]) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &[A; N]) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
1.46.0 · source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A>) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &Vec<U, A>) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T, U, A> PartialEq<Vec<U, A>> for &[T]where A: Allocator, T: PartialEq<U>,

source§

fn eq(&self, other: &Vec<U, A>) -> bool

This method tests for self and other values to be equal, and is used by ==.
source§

fn ne(&self, other: &Vec<U, A>) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, 'b> Pattern<'a> for &'b [char]

Searches for chars that are equal to any of the chars 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>

🔬This is a nightly-only experimental API. (pattern)
Associated searcher for this pattern
source§

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

🔬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

🔬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>

🔬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>,

🔬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>,

🔬This is a nightly-only experimental API. (pattern)
Removes the pattern from the back of haystack, if it matches.
source§

impl<'zf, T> ZeroFrom<'zf, [T]> for &'zf [T]

source§

fn zero_from(other: &'zf [T]) -> &'zf [T]

Clone the other C into a struct that may retain references into C.