pub struct DatabaseHookContext<'a, B>where
B: HookBackend,{
pub config: &'a AuthConfig,
pub db: &'a <B as HookBackend>::Connection,
pub tx: Option<&'a <B as HookBackend>::Transaction>,
pub request: Option<RequestHookContext>,
}Expand description
Context passed to database lifecycle hooks.
Fields§
§config: &'a AuthConfig§db: &'a <B as HookBackend>::Connection§tx: Option<&'a <B as HookBackend>::Transaction>Present for writes inside an auth transaction. Creation after hooks run only after a successful commit and receive no active transaction.
request: Option<RequestHookContext>Trait Implementations§
Auto Trait Implementations§
impl<'a, B> !RefUnwindSafe for DatabaseHookContext<'a, B>
impl<'a, B> !UnwindSafe for DatabaseHookContext<'a, B>
impl<'a, B> Freeze for DatabaseHookContext<'a, B>where
&'a <B as HookBackend>::Connection: Freeze,
Option<&'a <B as HookBackend>::Transaction>: Freeze,
impl<'a, B> Send for DatabaseHookContext<'a, B>
impl<'a, B> Sync for DatabaseHookContext<'a, B>
impl<'a, B> Unpin for DatabaseHookContext<'a, B>where
&'a <B as HookBackend>::Connection: Unpin,
Option<&'a <B as HookBackend>::Transaction>: Unpin,
impl<'a, B> UnsafeUnpin for DatabaseHookContext<'a, B>where
&'a <B as HookBackend>::Connection: UnsafeUnpin,
Option<&'a <B as HookBackend>::Transaction>: UnsafeUnpin,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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