Trait Work

Source
pub trait Work:
    Sized
    + Debug
    + Display
    + Add<Output = Result<Self, AddError>>
    + Sub<Output = Self>
    + PartialEq
    + PartialOrd
    + Clone {
    type Type;

    // Required methods
    fn new<A: Into<Self::Type>>(value: A) -> Self;
    fn zero() -> Self;
    fn min<'a>(a: &'a Self, b: &'a Self) -> &'a Self;
    fn parent_work_done_when(
        sub_work_done: Self,
        of_total_sub_work: Self,
        of_parent_work: Self,
    ) -> Self;
}

Required Associated Types§

Required Methods§

Source

fn new<A: Into<Self::Type>>(value: A) -> Self

Source

fn zero() -> Self

Source

fn min<'a>(a: &'a Self, b: &'a Self) -> &'a Self

Source

fn parent_work_done_when( sub_work_done: Self, of_total_sub_work: Self, of_parent_work: Self, ) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§