Operations on tuples

Trait CopyableTuple

Method first

fn first(&self) -> T

Method second

fn second(&self) -> U

Method swap

fn swap(&self) -> (U, T)

Trait ExtendedTupleOps

Method zip

fn zip(&self) -> ~[(A, B)]

Method map

fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]

Trait ImmutableTuple

Method first_ref

fn first_ref(&self) -> &'self T

Method second_ref

fn second_ref(&self) -> &'self U

Implementation of CopyableTuple<T, U> for (T, U) where <T: Copy, U: Copy>

Method first

fn first(&self) -> T

Return the first element of self

Method second

fn second(&self) -> U

Return the second element of self

Method swap

fn swap(&self) -> (U, T)

Return the results of swapping the two elements of self

Implementation of ImmutableTuple<T, U> for (T, U) where <T, U>

Method first_ref

fn first_ref(&self) -> &'self T

Method second_ref

fn second_ref(&self) -> &'self U

Implementation of ExtendedTupleOps<A, B> for (&'self [A], &'self [B]) where <'self, A: Copy, B: Copy>

Method zip

fn zip(&self) -> ~[(A, B)]

Method map

fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]

Implementation of ExtendedTupleOps<A, B> for (~[A], ~[B]) where <A: Copy, B: Copy>

Method zip

fn zip(&self) -> ~[(A, B)]

Method map

fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]

Implementation of Eq for (A,) where <A: Eq>

Method eq

fn eq(&self, other: &(A,)) -> bool

Method ne

fn ne(&self, other: &(A,)) -> bool

Implementation of Ord for (A,) where <A: Ord>

Method lt

fn lt(&self, other: &(A,)) -> bool

Method le

fn le(&self, other: &(A,)) -> bool

Method ge

fn ge(&self, other: &(A,)) -> bool

Method gt

fn gt(&self, other: &(A,)) -> bool

Implementation of Eq for (A, B) where <A: Eq, B: Eq>

Method eq

fn eq(&self, other: &(A, B)) -> bool

Method ne

fn ne(&self, other: &(A, B)) -> bool

Implementation of Ord for (A, B) where <A: Ord, B: Ord>

Method lt

fn lt(&self, other: &(A, B)) -> bool

Method le

fn le(&self, other: &(A, B)) -> bool

Method ge

fn ge(&self, other: &(A, B)) -> bool

Method gt

fn gt(&self, other: &(A, B)) -> bool

Implementation of Eq for (A, B, C) where <A: Eq, B: Eq, C: Eq>

Method eq

fn eq(&self, other: &(A, B, C)) -> bool

Method ne

fn ne(&self, other: &(A, B, C)) -> bool

Implementation of Ord for (A, B, C) where <A: Ord, B: Ord, C: Ord>

Method lt

fn lt(&self, other: &(A, B, C)) -> bool

Method le

fn le(&self, other: &(A, B, C)) -> bool

Method ge

fn ge(&self, other: &(A, B, C)) -> bool

Method gt

fn gt(&self, other: &(A, B, C)) -> bool