GXRt

Struct GXRt 

Source
pub struct GXRt<X: GXExt> {
    pub ext: X,
    /* private fields */
}

Fields§

§ext: X

Implementations§

Source§

impl<X: GXExt> GXRt<X>

Source

pub fn new(publisher: Publisher, subscriber: Subscriber) -> Self

Trait Implementations§

Source§

impl<X: Debug + GXExt> Debug for GXRt<X>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<X: GXExt> Rt for GXRt<X>

Source§

type AbortHandle = AbortHandle

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 Read more
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. Read more
Source§

fn notify_set(&mut self, id: BindId)

Notify the RT that a top level variable has been set internally Read more
Source§

fn spawn<F: Future<Output = (BindId, Box<dyn CustomBuiltinType>)> + Send + 'static>( &mut self, f: F, ) -> Self::AbortHandle

Spawn a task Read more
Source§

fn spawn_var<F: Future<Output = (BindId, Value)> + Send + 'static>( &mut self, f: F, ) -> Self::AbortHandle

Spawn a task Read more
Source§

fn watch( &mut self, s: Receiver<GPooled<Vec<(BindId, Box<dyn CustomBuiltinType>)>>>, )

Ask the runtime to watch a channel Read more
Source§

fn watch_var(&mut self, s: Receiver<GPooled<Vec<(BindId, Value)>>>)

Ask the runtime to watch a channel Read more

Auto Trait Implementations§

§

impl<X> !Freeze for GXRt<X>

§

impl<X> !RefUnwindSafe for GXRt<X>

§

impl<X> Send for GXRt<X>

§

impl<X> Sync for GXRt<X>

§

impl<X> Unpin for GXRt<X>
where X: Unpin,

§

impl<X> !UnwindSafe for GXRt<X>

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