Struct strseq::view::SharedStringSequence
source · pub struct SharedStringSequence { /* private fields */ }Expand description
Shared compact representation of a sequence of strings.
Implementations§
pub fn iter(&self) -> StringSequenceIter<'_>
pub fn slice(&self, range: impl ToRange) -> StringSequenceIter<'_>
pub fn get(&self, index: usize) -> Option<&str>
pub fn text(&self) -> &str
pub fn first(&self) -> Option<&str>
pub fn last(&self) -> Option<&str>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn starts_with(&self, other: &[impl AsRef<str>]) -> bool
pub fn ends_with(&self, other: &[impl AsRef<str>]) -> bool
pub fn contains(&self, other: &[impl AsRef<str>]) -> bool
pub fn from_slice(slice: &[impl AsRef<str>]) -> Self
Trait Implementations§
source§fn clone(&self) -> SharedStringSequence
fn clone(&self) -> SharedStringSequence
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§fn from(value: MutableStringSequence) -> Self
fn from(value: MutableStringSequence) -> Self
Converts to this type from the input type.
source§fn from(value: SharedStringSequence) -> Self
fn from(value: SharedStringSequence) -> Self
Converts to this type from the input type.
source§fn from(value: StringSequence) -> Self
fn from(value: StringSequence) -> Self
Converts to this type from the input type.
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more