pub struct HookContext<R, P>{
pub tenant: TenantContext,
pub method: ServiceMethodKind,
pub params: P,
pub data: Option<R>,
pub result: Option<HookResult<R>>,
pub error: Option<Error>,
pub services: ServiceCaller<R, P>,
pub config: DogConfigSnapshot,
}Expand description
A typed, Feathers-inspired hook context.
This context flows through: around → before → service → after → error A typed, Feathers-inspired hook context.
This context flows through: around → before → service → after → error
Fields§
§tenant: TenantContext§method: ServiceMethodKind§params: P§data: Option<R>Input data (create / patch / update)
result: Option<HookResult<R>>Output result (after hooks)
error: Option<Error>Error captured during execution
services: ServiceCaller<R, P>Feathers-style access to other services (runtime lookup)
config: DogConfigSnapshotImmutable snapshot of app config for this call
Implementations§
Source§impl<R, P> HookContext<R, P>
impl<R, P> HookContext<R, P>
pub fn new( tenant: TenantContext, method: ServiceMethodKind, params: P, services: ServiceCaller<R, P>, config: DogConfigSnapshot, ) -> Self
Auto Trait Implementations§
impl<R, P> Freeze for HookContext<R, P>
impl<R, P> RefUnwindSafe for HookContext<R, P>where
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, P> Send for HookContext<R, P>
impl<R, P> Sync for HookContext<R, P>
impl<R, P> Unpin for HookContext<R, P>
impl<R, P> UnwindSafe for HookContext<R, P>where
P: UnwindSafe,
R: 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