pub struct Pair<A, B> { /* private fields */ }
Expand description
Store several pieces of information in each node.
Implementations§
Trait Implementations§
Source§impl<TA, TB, A: Invertible<TA>, B: Invertible<TB>> Invertible<(TA, TB)> for Pair<A, B>
impl<TA, TB, A: Invertible<TA>, B: Invertible<TB>> Invertible<(TA, TB)> for Pair<A, B>
Source§impl<TA, TB, A: Operation<TA>, B: Operation<TB>> Operation<(TA, TB)> for Pair<A, B>
impl<TA, TB, A: Operation<TA>, B: Operation<TB>> Operation<(TA, TB)> for Pair<A, B>
Source§fn combine(&self, a: &(TA, TB), b: &(TA, TB)) -> (TA, TB)
fn combine(&self, a: &(TA, TB), b: &(TA, TB)) -> (TA, TB)
The operation that is performed to combine two intervals in the segment tree. Read more
Source§fn combine_mut(&self, a: &mut (TA, TB), b: &(TA, TB))
fn combine_mut(&self, a: &mut (TA, TB), b: &(TA, TB))
Replace the value in
a
with combine(a, b)
. This function exists to allow
certain optimizations and by default simply calls combine
.Source§fn combine_mut2(&self, a: &(TA, TB), b: &mut (TA, TB))
fn combine_mut2(&self, a: &(TA, TB), b: &mut (TA, TB))
Replace the value in
b
with combine(a, b)
. This function exists to allow
certain optimizations and by default simply calls combine
.Source§fn combine_left(&self, a: (TA, TB), b: &(TA, TB)) -> (TA, TB)
fn combine_left(&self, a: (TA, TB), b: &(TA, TB)) -> (TA, TB)
Must return the same as
combine
. This function exists to allow certain
optimizations and by default simply calls combine_mut
.Source§impl<A: Ord, B: Ord> Ord for Pair<A, B>
impl<A: Ord, B: Ord> Ord for Pair<A, B>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
impl<TA, TB, A: Commutative<TA>, B: Commutative<TB>> Commutative<(TA, TB)> for Pair<A, B>
impl<A: Copy, B: Copy> Copy for Pair<A, B>
impl<A: Eq, B: Eq> Eq for Pair<A, B>
impl<A, B> StructuralPartialEq for Pair<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Pair<A, B>
impl<A, B> RefUnwindSafe for Pair<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Pair<A, B>
impl<A, B> Sync for Pair<A, B>
impl<A, B> Unpin for Pair<A, B>
impl<A, B> UnwindSafe for Pair<A, B>where
A: UnwindSafe,
B: 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