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<Self, CeilingError>
pub fn parse<I, S>(entries: I) -> Result<Self, 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