Struct BSCtx

Source
pub struct BSCtx { /* private fields */ }

Trait Implementations§

Source§

impl Ctx for BSCtx

Source§

fn clear(&mut self)

Source§

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<()>

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)

unpublish the rpc identified by the bind id.
Source§

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)

Called when a subscription is no longer needed
Source§

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)

List the table at path, return Value::Null if the path did not change
Source§

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>

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 update(&mut self, val: &Val, value: Value)

Update the specified value
Source§

fn unpublish(&mut self, val: Val, ref_by: ExprId)

Stop publishing the specified id
Source§

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)

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

fn unref_var(&mut self, id: BindId, ref_by: ExprId)

Source§

fn set_var(&mut self, id: BindId, value: Value)

Called by the ExecCtx when set_var is called on it. All expressions that ref the id should be updated when this happens. Read more
Source§

impl Debug for BSCtx

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V