pub trait CopyableTuple<T, U> { fn first(&self) -> T; fn second(&self) -> U; fn swap(&self) -> (U, T); }
Method extensions to pairs where both types satisfy the Clone
bound
fn first(&self) -> T
Return the first element of self
fn second(&self) -> U
Return the second element of self
fn swap(&self) -> (U, T)
Return the results of swapping the two elements of self
impl<T: Clone, U: Clone> CopyableTuple<T, U> for (T, U)
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).