pub trait Context: Send {
// Required methods
fn db(&self) -> &Db;
fn reach(&self) -> Reach;
// Provided methods
fn read(&self) -> Read { ... }
fn clock(&self) -> Clock { ... }
fn bound(&self, name: &str) -> Result<Uuid> { ... }
fn input(&mut self) -> Result<Value> { ... }
fn event(&self, name: &str) -> Result<Value> { ... }
}Required Methods§
Provided Methods§
Sourcefn read(&self) -> Read
fn read(&self) -> Read
The only way a handler gets a Read, so it never reaches further than its context.
fn clock(&self) -> Clock
fn bound(&self, name: &str) -> Result<Uuid>
fn input(&mut self) -> Result<Value>
fn event(&self, name: &str) -> Result<Value>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Context for JobContext
A job reaches every record, as the principal whose action queued it if one did.