pub struct SessionData<U, P: PluginSet> {
pub session: Session,
pub user: AuthUser<U, P>,
pub token: Option<String>,
/* private fields */
}Expand description
The typed session handlers get (through Session<AppAuth> in axum).
Fields§
§session: Session§user: AuthUser<U, P>§token: Option<String>Implementations§
Source§impl<U: Fields, P: PluginSet> SessionData<U, P>
impl<U: Fields, P: PluginSet> SessionData<U, P>
pub fn from_view(view: SessionView) -> Result<Self, DecodeError>
Source§impl<U, P: PluginSet> SessionData<U, P>
impl<U, P: PluginSet> SessionData<U, P>
Sourcepub fn session_plugin<Pl: Plugin, I>(&self) -> &Pl::SessionFieldswhere
P: Has<Pl, I>,
pub fn session_plugin<Pl: Plugin, I>(&self) -> &Pl::SessionFieldswhere
P: Has<Pl, I>,
Columns a registered plugin added to session.
pub fn view(&self) -> &SessionView
Trait Implementations§
Auto Trait Implementations§
impl<U, P> Forget for SessionData<U, P>
impl<U, P> Freeze for SessionData<U, P>
impl<U, P> Move for SessionData<U, P>
impl<U, P> RefUnwindSafe for SessionData<U, P>
impl<U, P> Send for SessionData<U, P>
impl<U, P> Sync for SessionData<U, P>
impl<U, P> Unpin for SessionData<U, P>
impl<U, P> UnsafeUnpin for SessionData<U, P>
impl<U, P> UnwindSafe for SessionData<U, P>
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