pub trait AccessControl {
// Required method
fn allows(&self, path: &AttributePath, required: Privilege) -> Outcome;
}Expand description
Who is asking, and what they may have.
A trait rather than a concrete type because the answer comes from the Access Control cluster (§9.10), which does not exist yet — and because making it a parameter is what lets §8.4.3.2’s check ordering be tested without one.
Required Methods§
Sourcefn allows(&self, path: &AttributePath, required: Privilege) -> Outcome
fn allows(&self, path: &AttributePath, required: Privilege) -> Outcome
Whether the subject holds required over this path.
§6.6.1’s subsumption is the implementor’s to apply: a subject granted Administer
holds every lower privilege, which Privilege::grants expresses.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".