pub enum HookInput<'t, T: Table + Bind> {
None,
Row(&'t mut T),
PrimaryKey(&'t T::PrimaryKey),
QueryResult(QueryResult<'t, T>),
}Expand description
Represents different types of input that can be provided to hooks.
Variants§
None
No input is provided to the hook.
Row(&'t mut T)
A mutable reference to a table row entity.
PrimaryKey(&'t T::PrimaryKey)
A reference to the primary key of a table entity.
QueryResult(QueryResult<'t, T>)
The result of a query operation.
Trait Implementations§
Auto Trait Implementations§
impl<'t, T> Freeze for HookInput<'t, T>
impl<'t, T> !RefUnwindSafe for HookInput<'t, T>
impl<'t, T> Send for HookInput<'t, T>where
T: Sync,
impl<'t, T> Sync for HookInput<'t, T>where
T: Sync,
impl<'t, T> Unpin for HookInput<'t, T>
impl<'t, T> !UnwindSafe for HookInput<'t, T>
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> 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