pub struct Auth<T>(pub Option<T>);Expand description
Authentication context primitive: set by your auth middleware, read by
pages. Auth<T> is Option-like: auth.user() is None for guests.
Tuple Fields§
§0: Option<T>Implementations§
Trait Implementations§
Source§impl<T> FromContext for Auth<T>
impl<T> FromContext for Auth<T>
fn from_context(ctx: &Arc<RequestContext>) -> Result<Auth<T>, Error>
Auto Trait Implementations§
impl<T> Forget for Auth<T>
impl<T> Freeze for Auth<T>
impl<T> Move for Auth<T>
impl<T> RefUnwindSafe for Auth<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for Auth<T>
impl<T> Sync for Auth<T>
impl<T> Unpin for Auth<T>
impl<T> UnsafeUnpin for Auth<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for Auth<T>where
Option<T>: UnwindSafe,
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