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 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl 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
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more