Skip to main content

Guard

Trait Guard 

Source
pub trait Guard<T> {
    // Required method
    fn guards(self, initial: T, current: T) -> bool;
}
Expand description

Guards that can be used in Guarded.

Required Methods§

Source

fn guards(self, initial: T, current: T) -> bool

Property that must be satisfied by the end of Guarded.

initial is the initial guarded value remembered by Guarded, current is the current guarded value (the inner field of Guarded).

logic(prophetic) ⚠

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<'a, G: GuardRef<T>, T> Guard<&'a mut T> for G

Source§

impl<G: GuardRef<T>, T> Guard<FullBorrow<T>> for G