[][src]Struct rustupolis::tuple::Tuple

pub struct Tuple(_);

Implementations

impl Tuple[src]

pub fn new(elements: &[E]) -> Tuple[src]

Creates a new tuple from a given array of elements.

pub fn from_vec(v: Vec<E>) -> Tuple[src]

Creates a new tuple from a given vector of elements.

pub fn first(&self) -> &E[src]

Returns a reference to the first element of the tuple.

pub fn rest(&self) -> Tuple[src]

Returns a tuple of all but the first element of the original tuple.

pub fn is_empty(&self) -> bool[src]

Returns true if the tuple is empty, false otherwise.

pub fn is_defined(&self) -> bool[src]

Returns true if all elements are defined, i.e: none of them are wildcards. Returns false if the tuple contains any wildcards.

pub fn matches(&self, other: &Tuple) -> bool[src]

Returns true if this tuple matches the other.

pub fn range(&self) -> (Bound<Tuple>, Bound<Tuple>)[src]

Returns a range over this tuple.

Trait Implementations

impl Clone for Tuple[src]

impl Debug for Tuple[src]

impl Display for Tuple[src]

impl Eq for Tuple[src]

impl Ord for Tuple[src]

impl PartialEq<Tuple> for Tuple[src]

impl PartialOrd<Tuple> for Tuple[src]

impl StructuralEq for Tuple[src]

impl StructuralPartialEq for Tuple[src]

Auto Trait Implementations

impl RefUnwindSafe for Tuple

impl Send for Tuple

impl Sync for Tuple

impl Unpin for Tuple

impl UnwindSafe for Tuple

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,