pub struct Authenticated(pub String);Expand description
An extractor that requires a logged-in visitor, yielding their id.
An anonymous visitor never reaches the handler: they get 401 Unauthorized,
or a redirect when Identities::login_url is configured.
use churust_core::Authenticated;
async fn profile(Authenticated(user): Authenticated) -> String {
format!("signed in as {user}")
}Tuple Fields§
§0: StringThe logged-in visitor’s id.
Trait Implementations§
Source§impl Clone for Authenticated
impl Clone for Authenticated
Source§fn clone(&self) -> Authenticated
fn clone(&self) -> Authenticated
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 Authenticated
impl Debug for Authenticated
Source§impl FromCallParts for Authenticated
impl FromCallParts for Authenticated
Auto Trait Implementations§
impl Freeze for Authenticated
impl RefUnwindSafe for Authenticated
impl Send for Authenticated
impl Sync for Authenticated
impl Unpin for Authenticated
impl UnsafeUnpin for Authenticated
impl UnwindSafe for Authenticated
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