pub trait ImmutableTuple<T, U> { fn first_ref<'a>(&'a self) -> &'a T; fn second_ref<'a>(&'a self) -> &'a U; }
Method extensions for pairs where the types don't necessarily satisfy the
Clone
bound
fn first_ref<'a>(&'a self) -> &'a T
Return a reference to the first element of self
fn second_ref<'a>(&'a self) -> &'a U
Return a reference to the second element of self
impl<T, U> ImmutableTuple<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
).