pub trait CapProvider<P>where
P: Permission,{
// Required method
fn provide_cap(&self, target: &str) -> Result<Cap<P>, CapSecError>;
}Expand description
A type that can provide a capability token for permission P, possibly
after performing a scope check against the target.
Required Methods§
Sourcefn provide_cap(&self, target: &str) -> Result<Cap<P>, CapSecError>
fn provide_cap(&self, target: &str) -> Result<Cap<P>, CapSecError>
Provides a Cap<P> for the given target, or returns an error if the
target is outside the capability’s scope.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".