pub struct BSCtx { /* private fields */ }
Trait Implementations§
Source§impl Ctx for BSCtx
impl Ctx for BSCtx
fn clear(&mut self)
Source§fn call_rpc(&mut self, name: Path, args: Vec<(ArcStr, Value)>, id: BindId)
fn call_rpc(&mut self, name: Path, args: Vec<(ArcStr, Value)>, id: BindId)
This must return results from the same path in the call order. Read more
Source§fn publish_rpc(
&mut self,
name: Path,
doc: Value,
spec: Vec<ArgSpec>,
id: BindId,
) -> Result<()>
fn publish_rpc( &mut self, name: Path, doc: Value, spec: Vec<ArgSpec>, id: BindId, ) -> Result<()>
Publish an rpc at the specified path with the specified
procedure level doc and arg spec. Read more
Source§fn unpublish_rpc(&mut self, name: Path)
fn unpublish_rpc(&mut self, name: Path)
unpublish the rpc identified by the bind id.
Source§fn subscribe(&mut self, flags: UpdatesFlags, path: Path, ref_by: ExprId) -> Dval
fn subscribe(&mut self, flags: UpdatesFlags, path: Path, ref_by: ExprId) -> Dval
Subscribe to the specified netidx path. When the subscription
updates you are expected to deliver Netidx events to the
expression specified by ref_by.
Source§fn unsubscribe(&mut self, _path: Path, dv: Dval, ref_by: ExprId)
fn unsubscribe(&mut self, _path: Path, dv: Dval, ref_by: ExprId)
Called when a subscription is no longer needed
Source§fn list(&mut self, id: BindId, path: Path)
fn list(&mut self, id: BindId, path: Path)
List the netidx path, return Value::Null if the path did not
change. When the path did update you should send the output
back as a properly formatted struct with two fields, rows and
columns both containing string arrays.
Source§fn list_table(&mut self, id: BindId, path: Path)
fn list_table(&mut self, id: BindId, path: Path)
List the table at path, return Value::Null if the path did not
change
Source§fn stop_list(&mut self, id: BindId)
fn stop_list(&mut self, id: BindId)
list or table will no longer be called on this BindId, and
related resources can be cleaned up.
Source§fn publish(&mut self, path: Path, value: Value, ref_by: ExprId) -> Result<Val>
fn publish(&mut self, path: Path, value: Value, ref_by: ExprId) -> Result<Val>
Publish the specified value, returning it’s Id, which must be
used to update the value and unpublish it. If the path is
already published, return an error.
Source§fn set_timer(&mut self, id: BindId, timeout: Duration)
fn set_timer(&mut self, id: BindId, timeout: Duration)
arrange to have a Timer event delivered after timeout. When
the timer expires you are expected to deliver a Variable event
for the id, containing the current time.
Source§fn ref_var(&mut self, id: BindId, ref_by: ExprId)
fn ref_var(&mut self, id: BindId, ref_by: ExprId)
This will be called by the compiler whenever a bound variable
is referenced. The ref_by is the toplevel expression that
contains the variable reference. When a variable event
happens, you should update all the toplevel expressions that
ref that variable. Read more
fn unref_var(&mut self, id: BindId, ref_by: ExprId)
Auto Trait Implementations§
impl Freeze for BSCtx
impl !RefUnwindSafe for BSCtx
impl Send for BSCtx
impl Sync for BSCtx
impl Unpin for BSCtx
impl !UnwindSafe for BSCtx
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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