Skip to main content

UsagesPolicy

Trait UsagesPolicy 

pub trait UsagesPolicy {
    type Decorator<T: LinkReference, L: Doublets<T>>: Doublets<T>;

    // Required method
    fn decorate<T, L>(links: L) -> Self::Decorator<T, L>
       where T: LinkReference,
             L: Doublets<T>;
}
Expand description

Selects how a store reacts when an operation touches a link that other links still reference.

Implemented by Validate and CascadeResolve.

Required Associated Types§

type Decorator<T: LinkReference, L: Doublets<T>>: Doublets<T>

The decorator this policy wraps a store in.

Required Methods§

fn decorate<T, L>(links: L) -> Self::Decorator<T, L>
where T: LinkReference, L: Doublets<T>,

Wraps links in the decorator selected by this policy.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl UsagesPolicy for CascadeResolve

§

type Decorator<T: LinkReference, L: Doublets<T>> = CascadeUsagesResolver<T, L>

§

impl UsagesPolicy for Validate

§

type Decorator<T: LinkReference, L: Doublets<T>> = UsagesValidator<T, L>