pub struct Grant {
pub verbs: Vec<Verb>,
pub namespaces: Vec<String>,
}Expand description
A set of verbs allowed on a set of namespaces, inside one memory. The memory axis is implicit — a grant lives in the file it governs (D4).
Fields§
§verbs: Vec<Verb>§namespaces: Vec<String>Governed namespaces. ["*"] (or empty) = every namespace.
Implementations§
Source§impl Grant
impl Grant
pub fn covers(&self, verb: Verb, ns: &str) -> bool
Sourcepub fn to_object_string(&self) -> String
pub fn to_object_string(&self) -> String
The canonical object string a grant grain carries:
read,write ON caller,shared / delete ON *. Normative per OMS 1.6
§12.6: lowercase, comma-separated, lexicographically sorted verbs
and namespaces, duplicates dropped — so two implementations writing
the same grant produce the same content address.
pub fn from_object_string(s: &str) -> Result<Grant>
Trait Implementations§
impl Eq for Grant
impl StructuralPartialEq for Grant
Auto Trait Implementations§
impl Freeze for Grant
impl RefUnwindSafe for Grant
impl Send for Grant
impl Sync for Grant
impl Unpin for Grant
impl UnsafeUnpin for Grant
impl UnwindSafe for Grant
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