pub trait Toggler {
    // Required methods
    fn allow();
    fn allowed() -> bool;
    fn deny();

    // Provided method
    fn denied() -> bool { ... }
}
Expand description

Represents logic of providing access for some actions.

Required Methods§

source

fn allow()

Sets condition to allowed for some action.

source

fn allowed() -> bool

Returns bool, defining does toggle allow some action.

source

fn deny()

Sets condition to denied for some action.

Provided Methods§

source

fn denied() -> bool

Returns bool, defining does toggle deny some action.

Represents Self::allowed inversion.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<VS: ValueStorage<Value = bool>> Toggler for TogglerImpl<VS>