Skip to main content

Gates

Trait Gates 

Source
pub trait Gates {
    // Required methods
    fn can(&self, permission: &str) -> bool;
    fn enabled(&self, flag: &str) -> bool;

    // Provided method
    fn entitled(&self, entitlement: &str) -> bool { ... }
}

Required Methods§

Source

fn can(&self, permission: &str) -> bool

Source

fn enabled(&self, flag: &str) -> bool

Provided Methods§

Source

fn entitled(&self, entitlement: &str) -> bool

What the viewer’s plan holds: a switch, or a limit or quota above zero.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§