pub struct DelegationScope {
pub allowed_operations: Vec<Operation>,
pub constraints: Vec<Constraint>,
}Expand description
The full scope of a delegated authority.
Fields§
§allowed_operations: Vec<Operation>Operations the child is authorized to perform.
constraints: Vec<Constraint>Constraints that further narrow authorization.
Implementations§
Source§impl DelegationScope
impl DelegationScope
Sourcepub fn allow_operation(self, op: Operation) -> Self
pub fn allow_operation(self, op: Operation) -> Self
Add an operation.
Sourcepub fn constrain(self, c: Constraint) -> Self
pub fn constrain(self, c: Constraint) -> Self
Add a constraint.
Trait Implementations§
Source§impl Clone for DelegationScope
impl Clone for DelegationScope
Source§fn clone(&self) -> DelegationScope
fn clone(&self) -> DelegationScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DelegationScope
impl Debug for DelegationScope
Source§impl Default for DelegationScope
impl Default for DelegationScope
Source§fn default() -> DelegationScope
fn default() -> DelegationScope
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DelegationScope
impl<'de> Deserialize<'de> for DelegationScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DelegationScope
impl RefUnwindSafe for DelegationScope
impl Send for DelegationScope
impl Sync for DelegationScope
impl Unpin for DelegationScope
impl UnsafeUnpin for DelegationScope
impl UnwindSafe for DelegationScope
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