Trait Refinement

Source
pub trait Refinement {
    type InnerType;

    // Required methods
    fn new(x: Self::InnerType) -> Self;
    fn get(self) -> Self::InnerType;
    fn get_mut(&mut self) -> &mut Self::InnerType;
    fn invariant(value: Self::InnerType) -> Prop;
}

Required Associated Types§

Required Methods§

Source

fn new(x: Self::InnerType) -> Self

Source

fn get(self) -> Self::InnerType

Source

fn get_mut(&mut self) -> &mut Self::InnerType

Source

fn invariant(value: Self::InnerType) -> Prop

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§