pub enum ResourceScope {
Authority {
authority_id: AuthorityId,
operation: AuthorityOp,
},
Context {
context_id: ContextId,
operation: ContextOp,
},
Storage {
authority_id: AuthorityId,
path: StoragePath,
},
}Expand description
Resource scope for authority-based authorization
Variants§
Authority
Operations on an authority’s state
Context
Operations within a relational context
Storage
Storage access scoped to an authority
Implementations§
Source§impl ResourceScope
impl ResourceScope
Sourcepub fn to_datalog_pattern(&self) -> String
pub fn to_datalog_pattern(&self) -> String
Convert to Datalog pattern for Biscuit evaluation
Sourcepub fn resource_pattern(&self) -> String
pub fn resource_pattern(&self) -> String
Get the resource pattern for this scope
Sourcepub fn parse(resource: &str) -> Result<ResourceScope, ResourceScopeParseError>
pub fn parse(resource: &str) -> Result<ResourceScope, ResourceScopeParseError>
Parse a string resource into a ResourceScope.
Trait Implementations§
Source§impl Clone for ResourceScope
impl Clone for ResourceScope
Source§fn clone(&self) -> ResourceScope
fn clone(&self) -> ResourceScope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceScope
impl Debug for ResourceScope
Source§impl<'de> Deserialize<'de> for ResourceScope
impl<'de> Deserialize<'de> for ResourceScope
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ResourceScope, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ResourceScope
impl Hash for ResourceScope
Source§impl PartialEq for ResourceScope
impl PartialEq for ResourceScope
Source§impl Serialize for ResourceScope
impl Serialize for ResourceScope
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for ResourceScope
impl StructuralPartialEq for ResourceScope
Auto Trait Implementations§
impl Freeze for ResourceScope
impl RefUnwindSafe for ResourceScope
impl Send for ResourceScope
impl Sync for ResourceScope
impl Unpin for ResourceScope
impl UnsafeUnpin for ResourceScope
impl UnwindSafe for ResourceScope
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
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.