Struct vec_strings::StringsNoIndex
source · [−]pub struct StringsNoIndex { /* private fields */ }Expand description
Store any string efficiently in an immutable way.
Can store at most u32::MAX strings and only provides
StringsNoIndexIter and does not provide arbitary indexing.
Implementations
sourceimpl StringsNoIndex
impl StringsNoIndex
pub fn new() -> Self
sourcepub fn with_capacity(_len: u32) -> Self
pub fn with_capacity(_len: u32) -> Self
len- number of strings
NOTE that this function does nothing and is defined just to be compatible
with Strings.
pub fn len(&self) -> u32
pub fn is_empty(&self) -> bool
pub fn reserve_strs(&mut self, cnt: usize)
pub fn shrink_to_fit(&mut self)
pub fn iter(&self) -> StringsNoIndexIter<'_>ⓘNotable traits for StringsNoIndexIter<'a>impl<'a> Iterator for StringsNoIndexIter<'a> type Item = &'a str;
Trait Implementations
sourceimpl Clone for StringsNoIndex
impl Clone for StringsNoIndex
sourcefn clone(&self) -> StringsNoIndex
fn clone(&self) -> StringsNoIndex
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for StringsNoIndex
impl Debug for StringsNoIndex
sourceimpl Default for StringsNoIndex
impl Default for StringsNoIndex
sourcefn default() -> StringsNoIndex
fn default() -> StringsNoIndex
Returns the “default value” for a type. Read more
sourceimpl Hash for StringsNoIndex
impl Hash for StringsNoIndex
sourceimpl<'a> IntoIterator for &'a StringsNoIndex
impl<'a> IntoIterator for &'a StringsNoIndex
sourceimpl PartialEq<StringsNoIndex> for StringsNoIndex
impl PartialEq<StringsNoIndex> for StringsNoIndex
sourcefn eq(&self, other: &StringsNoIndex) -> bool
fn eq(&self, other: &StringsNoIndex) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &StringsNoIndex) -> bool
fn ne(&self, other: &StringsNoIndex) -> bool
This method tests for !=.
impl Eq for StringsNoIndex
impl StructuralEq for StringsNoIndex
impl StructuralPartialEq for StringsNoIndex
Auto Trait Implementations
impl RefUnwindSafe for StringsNoIndex
impl Send for StringsNoIndex
impl Sync for StringsNoIndex
impl Unpin for StringsNoIndex
impl UnwindSafe for StringsNoIndex
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more