pub struct Context {
pub custom: HashMap<String, Box<dyn Any + Send + Sync>>,
pub refs: HashMap<String, Arc<Node>>,
pub err: Vec<FieldError>,
/* private fields */
}Expand description
The caller’s context: per-call state custom validators may share, and
the definitions Define records for Refer.
Fields§
§custom: HashMap<String, Box<dyn Any + Send + Sync>>Anything a validator wants to keep across nodes: a counter, a handle,
a domain object. Type-erased, as TypeScript takes any property and Go
a map[string]any.
refs: HashMap<String, Arc<Node>>The nodes Define recorded during this call.
err: Vec<FieldError>The errors of the call, when the caller asked for them.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Context
impl !UnwindSafe for Context
impl Freeze for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnsafeUnpin for Context
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