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 quiet_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>> { ... }
fn quiet_scope<T>(self, scope: T) -> Result<Self, RulesetError>
where T: Into<BitFlags<Scope>> { ... }
}Provided Methods§
Sourcefn handle_access<T, U>(self, access: T) -> Result<Self, RulesetError>
fn handle_access<T, U>(self, access: T) -> Result<Self, RulesetError>
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>))
Sourcefn quiet_access<T, U>(self, access: T) -> Result<Self, RulesetError>
fn quiet_access<T, U>(self, access: T) -> Result<Self, RulesetError>
Selects handled access rights whose denials may be omitted from audit logs.
The selected rights must also be configured with handle_access(),
but the two methods may be called in either order. Filesystem and network quieting apply
only to objects marked with Rule::quiet(). This is supported since Landlock ABI v10.
Consecutive calls are interpreted as logical ORs. On error, returns a wrapped
HandleAccessesError.
Sourcefn scope<T>(self, scope: T) -> Result<Self, RulesetError>
fn scope<T>(self, scope: T) -> Result<Self, RulesetError>
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)
Sourcefn quiet_scope<T>(self, scope: T) -> Result<Self, RulesetError>
fn quiet_scope<T>(self, scope: T) -> Result<Self, RulesetError>
Selects scoped accesses whose denials should be omitted from audit logs.
The selected scopes must also be configured with scope(), but the two
methods may be called in either order. Unlike filesystem and network quiet accesses,
scopes do not use per-object rules. This is supported since Landlock ABI v10.
Consecutive calls are interpreted as logical ORs. On error, returns a wrapped
ScopeError.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".