Trait differential_dataflow::trace::cursor::MyTrait

source ·
pub trait MyTrait<'a>: Ord {
    type Owned;

    // Required methods
    fn into_owned(self) -> Self::Owned;
    fn clone_onto(&self, other: &mut Self::Owned);
    fn compare(&self, other: &Self::Owned) -> Ordering;
    fn borrow_as(other: &'a Self::Owned) -> Self;

    // Provided methods
    fn less_equals(&self, other: &Self::Owned) -> bool { ... }
    fn equals(&self, other: &Self::Owned) -> bool { ... }
    fn less_than(&self, other: &Self::Owned) -> bool { ... }
}
Expand description

A type that may be converted into and compared with another type.

The type must also be comparable with itself, and follow the same order as if converting instances to T and comparing the results.

Required Associated Types§

source

type Owned

Owned type into which this type can be converted.

Required Methods§

source

fn into_owned(self) -> Self::Owned

Conversion from an instance of this type to the owned type.

source

fn clone_onto(&self, other: &mut Self::Owned)

source

fn compare(&self, other: &Self::Owned) -> Ordering

Indicates that self <= other; used for sorting.

source

fn borrow_as(other: &'a Self::Owned) -> Self

Borrows an owned instance as onesself.

Provided Methods§

source

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

self <= other

source

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

self == other

source

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

self < other

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T: Ord + ToOwned + ?Sized> MyTrait<'a> for &'a T

§

type Owned = <T as ToOwned>::Owned

source§

fn into_owned(self) -> Self::Owned

source§

fn clone_onto(&self, other: &mut Self::Owned)

source§

fn compare(&self, other: &Self::Owned) -> Ordering

source§

fn borrow_as(other: &'a Self::Owned) -> Self

Implementors§

source§

impl<'a, B: Ord + Clone> MyTrait<'a> for Greetings<'a, B>

§

type Owned = Vec<B>

source§

impl<'a, C: BatchContainer> MyTrait<'a> for OptionWrapper<'a, C>
where C::PushItem: Default + Ord,

source§

impl<'a, T: Copy + Ord> MyTrait<'a> for Wrapper<T>

§

type Owned = T