Struct multistr::Dynamic[][src]

pub struct Dynamic<T: StrLike + ?Sized> { /* fields omitted */ }

Vec of immutable strings stored on the heap in the same buffer.

Slicing ranges of the vector yields the strings in the range concatenated together.

Methods

impl<T: StrLike + ?Sized> Dynamic<T>
[src]

Creates an empty Dynamic.

Creates an empty Dynamic with the given capacities.

The Dynamic will be able to hold exactly num strings totallying up to data in length without reallocating. If num and data are zero, the vector will not allocate.

Returns the number of strings this vector can hold without reallocating.

Returns the total length of strings this vector can hold without reallocating.

Reserves capacity for at least additional more strings totalling to bytes more bytes.

Similar to reserve, calling reserve_exact on the inner String and Vec.

See: Vec::shrink_to_fit.

Shortens the buffer, keeping the first len slices and dropping the rest.

Moves all of the elements of other into self, leaving other empty.

Returns the number of strings in the vector.

Returns true iff the vector contains no elements.

Splits the collection into two at the given index.

Clears the vector, removing all strings.

Adds a string to the end of the vec.

Removes a string from the end of the vec and discards it.

Removes a string from the end of the vec and allocates it onto a new buffer.

Important traits for Iter<'a, T>

Returns an iterator over the strings in the vector.

Trait Implementations

impl<T: StrLike + ?Sized> Send for Dynamic<T> where
    &'static T::Data: Send,
    T::OwnedData: Send
[src]

impl<T: StrLike + ?Sized> Sync for Dynamic<T> where
    &'static T::Data: Sync,
    T::OwnedData: Sync
[src]

impl<T: StrLike + ?Sized> Default for Dynamic<T>
[src]

Returns the "default value" for a type. Read more

impl<'a, T: StrLike + ?Sized> FromIterator<&'a T> for Dynamic<T>
[src]

Creates a value from an iterator. Read more

impl<'a, T: StrLike + ?Sized> FromIterator<&'a &'a T> for Dynamic<T>
[src]

Creates a value from an iterator. Read more

impl<'a, T: StrLike + ?Sized> Extend<&'a &'a T> for Dynamic<T>
[src]

Extends a collection with the contents of an iterator. Read more

impl<'a, T: StrLike + ?Sized> Extend<&'a T> for Dynamic<T>
[src]

Extends a collection with the contents of an iterator. Read more

impl<'a, T: StrLike + ?Sized> IntoIterator for &'a Dynamic<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Important traits for Iter<'a, T>

Creates an iterator from a value. Read more

impl<T: ?Sized + StrLike> Index<usize> for Dynamic<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: ?Sized + StrLike + StrLikeMut> IndexMut<usize> for Dynamic<T> where
    T::Data: SplitAtMut<usize>,
    T::OwnedData: BorrowMut<T::Data>, 
[src]

Performs the mutable indexing (container[index]) operation.

impl<T: ?Sized + DataConcat> Index<Range<usize>> for Dynamic<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: ?Sized + DataConcat> Index<RangeFrom<usize>> for Dynamic<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: ?Sized + DataConcat> Index<RangeTo<usize>> for Dynamic<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: ?Sized + DataConcat> Index<RangeFull> for Dynamic<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: ?Sized + StrLike> Clone for Dynamic<T> where
    Cow<'static, T::Data>: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: ?Sized + StrLike> Hash for Dynamic<T> where
    T::Data: Hash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: ?Sized + StrLike + PartialEq> PartialEq for Dynamic<T>
[src]

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

This method tests for !=.

impl<'a, T: ?Sized + StrLike + PartialEq> PartialEq<&'a [&'a T]> for Dynamic<T>
[src]

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

This method tests for !=.

impl<'a, T: ?Sized + StrLike + PartialEq> PartialEq<Vec<&'a T>> for Dynamic<T>
[src]

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

This method tests for !=.

impl<T: ?Sized + StrLike + Eq> Eq for Dynamic<T>
[src]

impl<T: ?Sized + StrLike + PartialOrd> PartialOrd for Dynamic<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, T: ?Sized + StrLike + PartialOrd> PartialOrd<&'a [&'a T]> for Dynamic<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<'a, T: ?Sized + StrLike + PartialOrd> PartialOrd<Vec<&'a T>> for Dynamic<T>
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<T: ?Sized + StrLike + Ord> Ord for Dynamic<T>
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl<T: ?Sized + StrLike + Debug> Debug for Dynamic<T>
[src]

Formats the value using the given formatter. Read more