pub struct Delegation {
pub allow_delegation: bool,
pub max_depth: u8,
pub delegatable_scopes: Option<Vec<Scope>>,
pub allow_any_delegate: bool,
pub allowed_delegates: Vec<String>,
pub min_ttl_reduction_seconds: i64,
}Expand description
Constraints governing whether and how this token may be delegated onward.
ANVIL section 5.2 requires that an agent not delegate capabilities it does not hold, and that child capabilities be a strict subset of the parent’s.
Fields§
§allow_delegation: boolWhether onward delegation is permitted at all.
max_depth: u8Remaining delegation depth. Zero forbids further delegation.
delegatable_scopes: Option<Vec<Scope>>Subset of scopes that may be delegated. None means the holder’s full
scope set is delegatable, subject to allow_delegation.
allow_any_delegate: boolWhether any recipient may receive a delegation.
allowed_delegates: Vec<String>DIDs permitted to receive a delegation when allow_any_delegate is
false.
min_ttl_reduction_seconds: i64Minimum reduction in lifetime, in seconds, that a delegated token must apply relative to this one.
Trait Implementations§
Source§impl Clone for Delegation
impl Clone for Delegation
Source§impl Debug for Delegation
impl Debug for Delegation
Source§impl<'de> Deserialize<'de> for Delegation
impl<'de> Deserialize<'de> for Delegation
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
impl Eq for Delegation
Source§impl PartialEq for Delegation
impl PartialEq for Delegation
Source§impl Serialize for Delegation
impl Serialize for Delegation
impl StructuralPartialEq for Delegation
Auto Trait Implementations§
impl Freeze for Delegation
impl RefUnwindSafe for Delegation
impl Send for Delegation
impl Sync for Delegation
impl Unpin for Delegation
impl UnsafeUnpin for Delegation
impl UnwindSafe for Delegation
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