ViewRel

Trait ViewRel 

Source
pub trait ViewRel {
    type Auth;
    type Frag: UnitRA;

    // Required methods
    fn rel(a: Option<Self::Auth>, f: Self::Frag) -> bool;
    fn rel_mono(a: Option<Self::Auth>, f1: Self::Frag, f2: Self::Frag);
    fn rel_none(a: Option<Self::Auth>, f: Self::Frag);
    fn rel_unit(a: Option<Self::Auth>);
}
Expand description

The relation used in View.

Required Associated Types§

Source

type Auth

The type of the authority portion of a view

Source

type Frag: UnitRA

The type of a fragment portion of a view

Required Methods§

Source

fn rel(a: Option<Self::Auth>, f: Self::Frag) -> bool

The relation between the authority and a fragment

Source

fn rel_mono(a: Option<Self::Auth>, f1: Self::Frag, f2: Self::Frag)

(law)

requires

Self::rel(a, f1)

requires

f2.incl(f1)

ensures

Self::rel(a, f2)

Source

fn rel_none(a: Option<Self::Auth>, f: Self::Frag)

(law)

requires

Self::rel(a, f)

ensures

Self::rel(None, f)

Source

fn rel_unit(a: Option<Self::Auth>)

(law)

ensures

Self::rel(a, Self::Frag::unit())

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§