pub struct Ceiling(pub Vec<(RoleOrGrant, ScopeRef)>);Expand description
A session’s upper bound (IDENTITY-40): (role or grant, scope) entries,
spelled editor@MENGER-12, tickets.get@*. A check passes a ceiling
when some entry’s scope is in the target’s chain and the entry allows the
grant (the grant itself, or a role listing it).
Tuple Fields§
§0: Vec<(RoleOrGrant, ScopeRef)>Implementations§
Source§impl Ceiling
impl Ceiling
Sourcepub fn entry(text: &str) -> Result<(RoleOrGrant, ScopeRef), CeilingError>
pub fn entry(text: &str) -> Result<(RoleOrGrant, ScopeRef), CeilingError>
One role@SCOPE or grant@SCOPE entry.
Sourcepub fn parse<I, S>(entries: I) -> Result<Ceiling, CeilingError>
pub fn parse<I, S>(entries: I) -> Result<Ceiling, CeilingError>
A ceiling from its entries’ text.
Sourcepub fn layers_of(ctx: &AuthContext) -> Result<Vec<Ceiling>, CeilingError>
pub fn layers_of(ctx: &AuthContext) -> Result<Vec<Ceiling>, CeilingError>
The ceilings an identity’s metadata carries under CEILING_KEY:
none → []; a list of strings → one layer; a list of lists → one
layer each. Anything else is an error, and a caller whose ceiling
cannot be read must be refused, never widened.
Trait Implementations§
impl Eq for Ceiling
impl StructuralPartialEq for Ceiling
Auto Trait Implementations§
impl Forget for Ceiling
impl Freeze for Ceiling
impl RefUnwindSafe for Ceiling
impl Send for Ceiling
impl Sync for Ceiling
impl Unpin for Ceiling
impl UnsafeUnpin for Ceiling
impl UnwindSafe for Ceiling
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.