pub trait Scope: 'static {
// Required method
fn check(&self, target: &str) -> Result<(), CapSecError>;
}Expand description
A restriction that narrows the set of targets a capability can act on.
Implement this trait to define custom scopes. The check method
returns Ok(()) if the target is within scope, or an error if not.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".