pub enum UnionScope {
AifValue(AifValue),
AllowAll,
DenyAll,
}
Expand description
A scope that can use multiple backends, erasing its type.
(Think “dyn Scope
” but without requiring dyn compatibility).
This is useful when combining multiple authentication methods, eg. allowing ACE tokens (that
need an AifValue
to express their arbitrary scopes) as well as a configured admin key (that
has “all” permission, which are not expressible in an AifValue
.
Variants§
Trait Implementations§
Source§impl Clone for UnionScope
impl Clone for UnionScope
Source§fn clone(&self) -> UnionScope
fn clone(&self) -> UnionScope
Returns a copy 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 UnionScope
impl Debug for UnionScope
Source§impl Format for UnionScopewhere
AifValue: Format,
impl Format for UnionScopewhere
AifValue: Format,
Source§impl From<AifValue> for UnionScope
impl From<AifValue> for UnionScope
Source§impl From<AllowAll> for UnionScope
impl From<AllowAll> for UnionScope
Source§impl From<DenyAll> for UnionScope
impl From<DenyAll> for UnionScope
Source§impl From<Infallible> for UnionScope
impl From<Infallible> for UnionScope
Source§fn from(value: Infallible) -> Self
fn from(value: Infallible) -> Self
Converts to this type from the input type.
Source§impl Scope for UnionScope
impl Scope for UnionScope
Auto Trait Implementations§
impl Freeze for UnionScope
impl RefUnwindSafe for UnionScope
impl Send for UnionScope
impl Sync for UnionScope
impl Unpin for UnionScope
impl UnwindSafe for UnionScope
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