pub enum AuthorizationResult {
Authorized {
token: Box<CapabilityToken>,
},
RequiresApproval {
resource: String,
permission: Permission,
},
}Expand description
Authorization result after validation.
Variants§
Authorized
Authorized by a specific token.
Fields
§
token: Box<CapabilityToken>The token that granted authorization.
RequiresApproval
Not authorized - approval required.
Implementations§
Source§impl AuthorizationResult
impl AuthorizationResult
Check if authorized.
Sourcepub fn token(&self) -> Option<&CapabilityToken>
pub fn token(&self) -> Option<&CapabilityToken>
Get the authorizing token if authorized.
Trait Implementations§
Source§impl Clone for AuthorizationResult
impl Clone for AuthorizationResult
Source§fn clone(&self) -> AuthorizationResult
fn clone(&self) -> AuthorizationResult
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 moreAuto Trait Implementations§
impl Freeze for AuthorizationResult
impl RefUnwindSafe for AuthorizationResult
impl Send for AuthorizationResult
impl Sync for AuthorizationResult
impl Unpin for AuthorizationResult
impl UnsafeUnpin for AuthorizationResult
impl UnwindSafe for AuthorizationResult
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