Struct immutable_seq::seq::Seq [] [src]

pub struct Seq<T>(_);

Methods

impl<T: 'static> Seq<T>
[src]

The empty sequence.

/O(1)/

A sequence with a single value.

/O(1)/

A new sequence that is self with x added to the front.

/O(1)/

A new sequence that is self with x added to the back.

/O(1)/

The concatenation of self with other.

/O(log(min(self.len(),other.len())))/

Is the sequence empty?

The number of elements in the sequence

/O(1)/

The first element in the sequence, if it exists.

/O(1)/

The back element, if it exsts.

/O(1)/

A new sequence that is self with the front element removed, together with the front element (if it exists).

/O(1)/

A new sequence that is self with the back element removed, together with the back element (if it exists).

/O(1)/

A new sequence with the element at index i replaced by f(self[i]).

If i is out of range, returns a clone of self.

/O(log(min(i,self.len()-i)))/

A new sequence with the element at index i replaced by x.

If i is out of range, returns a clone of self.

/O(log(min(i,self.len()-i)))/

A new sequence consisting of only the first n elements.

If n >= self.len(), then returns a clone of self.

/O(log(min(n,self.len()-n)))/

A new sequence consisting of only the last n elements.

If n >= self.len(), then returns a clone of self.

/O(log(min(n,self.len()-n)))/

Two new sequences, consisting of the first n elements, and the remaining elements, respectively.

If n >= self.len(), then the first sequence is a clone of self and the second is empty.

/O(log(min(n,self.len()-n)))/

A new sequence with the element at index i removed, together with the element at index i, if it exists.

If i is out of range, then the returned sequence is a clone of self, and the element is None.

/O(log(min(i,self.len()-i)))/

A new sequence with x inserted at index i.

If i < self.len(), then x will immediately precede self[i] in the new sequence.

if i >= self.len(), then x will be the last element in the new sequence.

/O(log(min(i,self.len()-i)))/

Get the element at index i, if it exists.

/O(log(min(i,self.len()-i)))/

An iterator over the sequence.

/O(1)/

Trait Implementations

impl<T: Debug> Debug for Seq<T>
[src]

Formats the value using the given formatter.

impl<T: 'static> Clone for Seq<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: 'static> PartialEq for Seq<T> where T: PartialEq
[src]

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

This method tests for !=.

impl<T: 'static> Eq for Seq<T> where T: Eq
[src]

impl<T: 'static> PartialOrd for Seq<T> where T: PartialOrd
[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: 'static> Ord for Seq<T> where T: Ord
[src]

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

impl<'a, T: 'static> IntoIterator for &'a Seq<T>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

impl<T: 'static> FromIterator<T> for Seq<T>
[src]

Creates a value from an iterator. Read more

impl<T: 'static> From<Vec<T>> for Seq<T>
[src]

Performs the conversion.

impl<T: 'static> Index<usize> for Seq<T>
[src]

The returned type after indexing

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