Operations on tuples
CopyableTuple
ExtendedTupleOps
ImmutableTuple
of CopyableTuple<T, U> for (T, U) where <T: Copy, U: Copy>
of ImmutableTuple<T, U> for (T, U) where <T, U>
of ExtendedTupleOps<A, B> for (&'self [A], &'self [B]) where <'self, A: Copy, B: Copy>
of ExtendedTupleOps<A, B> for (~[A], ~[B]) where <A: Copy, B: Copy>
of Eq for (A,) where <A: Eq>
of Ord for (A,) where <A: Ord>
of Eq for (A, B) where <A: Eq, B: Eq>
of Ord for (A, B) where <A: Ord, B: Ord>
of Eq for (A, B, C) where <A: Eq, B: Eq, C: Eq>
of Ord for (A, B, C) where <A: Ord, B: Ord, C: Ord>
CopyableTuple
first
fn first(&self) -> T
second
fn second(&self) -> U
swap
fn swap(&self) -> (U, T)
ExtendedTupleOps
zip
fn zip(&self) -> ~[(A, B)]
map
fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]
ImmutableTuple
first_ref
fn first_ref(&self) -> &'self T
second_ref
fn second_ref(&self) -> &'self U
CopyableTuple<T, U>
for (T, U)
where <T: Copy, U: Copy>
first
fn first(&self) -> T
Return the first element of self
second
fn second(&self) -> U
Return the second element of self
swap
fn swap(&self) -> (U, T)
Return the results of swapping the two elements of self
ImmutableTuple<T, U>
for (T, U)
where <T, U>
first_ref
fn first_ref(&self) -> &'self T
second_ref
fn second_ref(&self) -> &'self U
ExtendedTupleOps<A, B>
for (&'self [A], &'self [B])
where <'self, A: Copy, B: Copy>
zip
fn zip(&self) -> ~[(A, B)]
map
fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]
ExtendedTupleOps<A, B>
for (~[A], ~[B])
where <A: Copy, B: Copy>
zip
fn zip(&self) -> ~[(A, B)]
map
fn map<C>(&self, f: &fn(a: &A, b: &B) -> C) -> ~[C]
Eq
for (A,)
where <A: Eq>
eq
fn eq(&self, other: &(A,)) -> bool
ne
fn ne(&self, other: &(A,)) -> bool
Ord
for (A,)
where <A: Ord>
lt
fn lt(&self, other: &(A,)) -> bool
le
fn le(&self, other: &(A,)) -> bool
ge
fn ge(&self, other: &(A,)) -> bool
gt
fn gt(&self, other: &(A,)) -> bool
Eq
for (A, B)
where <A: Eq, B: Eq>
eq
fn eq(&self, other: &(A, B)) -> bool
ne
fn ne(&self, other: &(A, B)) -> bool
Ord
for (A, B)
where <A: Ord, B: Ord>
lt
fn lt(&self, other: &(A, B)) -> bool
le
fn le(&self, other: &(A, B)) -> bool
ge
fn ge(&self, other: &(A, B)) -> bool
gt
fn gt(&self, other: &(A, B)) -> bool
Eq
for (A, B, C)
where <A: Eq, B: Eq, C: Eq>
eq
fn eq(&self, other: &(A, B, C)) -> bool
ne
fn ne(&self, other: &(A, B, C)) -> bool
Ord
for (A, B, C)
where <A: Ord, B: Ord, C: Ord>
lt
fn lt(&self, other: &(A, B, C)) -> bool
le
fn le(&self, other: &(A, B, C)) -> bool
ge
fn ge(&self, other: &(A, B, C)) -> bool
gt
fn gt(&self, other: &(A, B, C)) -> bool