Trait RulesetAttr

Source
pub trait RulesetAttr:
    Sized
    + AsMut<Ruleset>
    + Compatible {
    // Provided methods
    fn handle_access<T, U>(self, access: T) -> Result<Self, RulesetError>
       where T: Into<BitFlags<U>>,
             U: HandledAccess + PrivateHandledAccess { ... }
    fn scope<T>(self, scope: T) -> Result<Self, RulesetError>
       where T: Into<BitFlags<Scope>> { ... }
}

Provided Methods§

Source

fn handle_access<T, U>(self, access: T) -> Result<Self, RulesetError>
where T: Into<BitFlags<U>>, U: HandledAccess + PrivateHandledAccess,

Attempts to add a set of access rights that will be supported by this ruleset. By default, all actions requiring these access rights will be denied. Consecutive calls to handle_access() will be interpreted as logical ORs with the previous handled accesses.

On error, returns a wrapped HandleAccessesError. E.g., RulesetError::HandleAccesses(HandleAccessesError::Fs(HandleAccessError<AccessFs>))

Source

fn scope<T>(self, scope: T) -> Result<Self, RulesetError>
where T: Into<BitFlags<Scope>>,

Attempts to add a set of scopes that will be supported by this ruleset. Consecutive calls to scope() will be interpreted as logical ORs with the previous scopes.

On error, returns a wrapped ScopeError. E.g., RulesetError::Scope(ScopeError)

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§