pub struct Pair<T>(/* private fields */);
Implementations§
Source§impl<T> Pair<T>
impl<T> Pair<T>
pub fn new(left: T, right: T) -> Self
pub fn iter(&self) -> Iter<'_, T>
pub fn iter_mut(&mut self) -> IterMut<'_, T>
pub fn map<U, F>(self, f: F) -> Pair<U>where
F: Fn(T) -> U,
pub fn zip<U>(self, other: Pair<U>) -> Pair<(T, U)>
pub fn compare<'a, U>(self, other: &'a Pair<U>) -> Pair<(T, &'a U)>
pub fn merge<U, V, F>(self, other: Pair<U>, f: F) -> Pair<V>where
F: Fn(T, U) -> V,
pub fn apply<U, V, F>(self, other: &Pair<U>, f: F) -> Pair<V>
Trait Implementations§
Source§impl<T> IntoIterator for Pair<T>
impl<T> IntoIterator for Pair<T>
Source§impl<T> Paired for Pair<T>
impl<T> Paired for Pair<T>
type Item = T
fn swap(&mut self)
fn get_left(&self) -> &Self::Item
fn get_right(&self) -> &Self::Item
fn get_left_mut(&mut self) -> &mut Self::Item
fn get_right_mut(&mut self) -> &mut Self::Item
fn get(&self, s: Side) -> &Self::Item
fn get_mut(&mut self, s: Side) -> &mut Self::Item
impl<T: Copy> Copy for Pair<T>
impl<T: Eq> Eq for Pair<T>
impl<T> StructuralPartialEq for Pair<T>
Auto Trait Implementations§
impl<T> Freeze for Pair<T>where
T: Freeze,
impl<T> RefUnwindSafe for Pair<T>where
T: RefUnwindSafe,
impl<T> Send for Pair<T>where
T: Send,
impl<T> Sync for Pair<T>where
T: Sync,
impl<T> Unpin for Pair<T>where
T: Unpin,
impl<T> UnwindSafe for Pair<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more