pub struct ReadRequestCtx {
pub kind: String,
pub model: Value,
pub context: Value,
pub params: Map<String, Value>,
pub state: Map<String, Value>,
}Expand description
R1 / R4 / R5 (request-level) context. before (R1) may mutate Self::params
and may error to cancel; afterFetch (R4) receives the final assembled result
and may return a replacement; onError (R5) may recover by returning a value.
Fields§
§kind: StringThe request kind ("query").
model: ValueThe ctx.model handle (entity name + manifest meta, or null on the read path).
context: ValueThe per-call context threaded from options.context ({} when none).
params: Map<String, Value>The mutable request params ({"params": {...}, "options": {...}}), which an
R1 hook may rewrite before key-resolution.
state: Map<String, Value>Per-request scratch a hook can stash values in across R1→R4→R5.
Trait Implementations§
Source§impl Clone for ReadRequestCtx
impl Clone for ReadRequestCtx
Source§fn clone(&self) -> ReadRequestCtx
fn clone(&self) -> ReadRequestCtx
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 moreAuto Trait Implementations§
impl Freeze for ReadRequestCtx
impl RefUnwindSafe for ReadRequestCtx
impl Send for ReadRequestCtx
impl Sync for ReadRequestCtx
impl Unpin for ReadRequestCtx
impl UnsafeUnpin for ReadRequestCtx
impl UnwindSafe for ReadRequestCtx
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.