Struct compare::Borrowing [] [src]

pub struct Borrowing<C, Lb: ?Sized, Rb: ?Sized = Lb> where C: Compare<Lb, Rb>(_, _);

A comparator that borrows its parameters before comparing them.

See Compare::borrow for an example.

Trait Implementations

impl<C, L: ?Sized, R: ?Sized, Lb: ?Sized, Rb: ?Sized> Compare<L, R> for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb>, L: Borrow<Lb>, R: Borrow<Rb>

fn compare(&self, l: &L, r: &R) -> Ordering

fn compares_lt(&self, l: &L, r: &R) -> bool

fn compares_le(&self, l: &L, r: &R) -> bool

fn compares_ge(&self, l: &L, r: &R) -> bool

fn compares_gt(&self, l: &L, r: &R) -> bool

fn compares_eq(&self, l: &L, r: &R) -> bool

fn compares_ne(&self, l: &L, r: &R) -> bool

fn borrowing(self) -> Borrowing<Self, L, R> where Self: Sized

fn rev(self) -> Rev<Self> where Self: Sized

fn swap(self) -> Swap<Self> where Self: Sized

fn then<D>(self, then: D) -> Then<Self, D> where D: Compare<L, R>, Self: Sized

impl<C, Lb: ?Sized, Rb: ?Sized> Clone for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + Clone

fn clone(&self) -> Self

1.0.0fn clone_from(&mut self, source: &Self)

impl<C, Lb: ?Sized, Rb: ?Sized> Copy for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + Copy

impl<C, Lb: ?Sized, Rb: ?Sized> Default for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + Default

fn default() -> Self

impl<C, Lb: ?Sized, Rb: ?Sized> PartialEq for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + PartialEq

fn eq(&self, other: &Self) -> bool

1.0.0fn ne(&self, other: &Rhs) -> bool

impl<C, Lb: ?Sized, Rb: ?Sized> Eq for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + Eq

impl<C, Lb: ?Sized, Rb: ?Sized> Debug for Borrowing<C, Lb, Rb> where C: Compare<Lb, Rb> + Debug

fn fmt(&self, f: &mut Formatter) -> Result