pub struct SessionAuthorization { /* private fields */ }Implementations§
Source§impl SessionAuthorization
impl SessionAuthorization
pub fn new(authenticated: RoleBinding) -> Self
pub fn authenticated(&self) -> &Arc<RoleBinding> ⓘ
pub fn session(&self) -> &Arc<RoleBinding> ⓘ
pub fn outer(&self) -> &Arc<RoleBinding> ⓘ
pub fn current(&self) -> &Arc<RoleBinding> ⓘ
pub fn selected(&self) -> Option<&Arc<RoleBinding>>
pub fn set_role(&mut self, selected: Option<Arc<RoleBinding>>)
Sourcepub fn restore_session(&mut self, session: Arc<RoleBinding>)
pub fn restore_session(&mut self, session: Arc<RoleBinding>)
Session and role assignment commute during transaction-local restoration.
pub fn set_session(&mut self, session: Arc<RoleBinding>)
pub fn set_effective(&mut self, role: Arc<RoleBinding>)
pub fn discard(&mut self)
pub fn show_role(&self) -> &str
Trait Implementations§
Source§impl Clone for SessionAuthorization
impl Clone for SessionAuthorization
Auto Trait Implementations§
impl Freeze for SessionAuthorization
impl RefUnwindSafe for SessionAuthorization
impl Send for SessionAuthorization
impl Sync for SessionAuthorization
impl Unpin for SessionAuthorization
impl UnsafeUnpin for SessionAuthorization
impl UnwindSafe for SessionAuthorization
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> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more