Skip to main content

Context

Trait Context 

Source
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§

Source

fn db(&self) -> &Db

Source

fn reach(&self) -> Reach

Provided Methods§

Source

fn read(&self) -> Read

The only way a handler gets a Read, so it never reaches further than its context.

Source

fn clock(&self) -> Clock

Source

fn bound(&self, name: &str) -> Result<Uuid>

Source

fn input(&mut self) -> Result<Value>

Source

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§

Source§

impl Context for JobContext

A job reaches every record, as the principal whose action queued it if one did.