Struct multistr::vec::StringVec [] [src]

pub struct StringVec { /* 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 StringVec
[src]

Creates an empty StringVec.

Creates an empty StringVec with the given capacities.

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

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

Returns the number of bytes 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 vector, keeping the first len strings 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.

Returns an iterator over the strings in the vector.

Trait Implementations

impl Eq for StringVec
[src]

impl PartialEq for StringVec
[src]

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

This method tests for !=.

impl Clone for StringVec
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for StringVec
[src]

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

impl Hash for StringVec
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<S: AsRef<str>> FromIterator<S> for StringVec
[src]

Creates a value from an iterator. Read more

impl<S: AsRef<str>> Extend<S> for StringVec
[src]

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

impl Index<usize> for StringVec
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl Index<Range<usize>> for StringVec
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl Index<RangeTo<usize>> for StringVec
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl Index<RangeFrom<usize>> for StringVec
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl Index<RangeFull> for StringVec
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<'a> IntoIterator for &'a StringVec
[src]

Which kind of iterator are we turning this into?

The type of the elements being iterated over.

Creates an iterator from a value. Read more

impl IntoIterator for StringVec
[src]

Which kind of iterator are we turning this into?

The type of the elements being iterated over.

Creates an iterator from a value. Read more

impl PartialOrd for StringVec
[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 Ord for StringVec
[src]

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

impl Debug for StringVec
[src]

Formats the value using the given formatter.