#[non_exhaustive]pub enum DelegationMode {
OnBehalfOfUser,
AsGateway,
}Expand description
Whether a delegated outbound token represents the user’s identity or the gateway’s own identity to the downstream service. Affects scope-narrowing rules and audit-log attribution.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
OnBehalfOfUser
Outbound token represents the original user (RFC 8693 on-behalf-of / actor-token flows, UCAN delegation).
AsGateway
Outbound token represents the gateway / agent itself as the principal; user identity is conveyed via separate context.
Trait Implementations§
Source§impl Clone for DelegationMode
impl Clone for DelegationMode
Source§fn clone(&self) -> DelegationMode
fn clone(&self) -> DelegationMode
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 DelegationMode
impl Debug for DelegationMode
Source§impl<'de> Deserialize<'de> for DelegationMode
impl<'de> Deserialize<'de> for DelegationMode
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 DelegationMode
Source§impl Hash for DelegationMode
impl Hash for DelegationMode
Source§impl PartialEq for DelegationMode
impl PartialEq for DelegationMode
Source§impl Serialize for DelegationMode
impl Serialize for DelegationMode
impl StructuralPartialEq for DelegationMode
Auto Trait Implementations§
impl Freeze for DelegationMode
impl RefUnwindSafe for DelegationMode
impl Send for DelegationMode
impl Sync for DelegationMode
impl Unpin for DelegationMode
impl UnsafeUnpin for DelegationMode
impl UnwindSafe for DelegationMode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.