pub trait Ctx {
fn clear(&mut self);
fn durable_subscribe(
&mut self,
flags: UpdatesFlags,
path: Path,
ref_by: ExprId
) -> Dval;
fn unsubscribe(&mut self, path: Path, dv: Dval, ref_by: ExprId);
fn ref_var(&mut self, name: Chars, scope: Path, ref_by: ExprId);
fn unref_var(&mut self, name: Chars, scope: Path, ref_by: ExprId);
fn set_var(
&mut self,
variables: &mut FxHashMap<Path, FxHashMap<Chars, Value>>,
local: bool,
scope: Path,
name: Chars,
value: Value
);
fn call_rpc(
&mut self,
name: Path,
args: Vec<(Chars, Value)>,
ref_by: ExprId,
id: RpcCallId
);
}
For a given name, this must have at most one outstanding call
at a time, and must preserve the order of the calls. Calls to
different names may execute concurrently.