Skip to main content

FabricTransport

Struct FabricTransport 

Source
pub struct FabricTransport { /* private fields */ }
Expand description

A transport that commits operations by delegating to an EvalFabric.

Reads return locally stored values and change events accumulate locally; Transport::realize is forwarded to the fabric, whose reply value becomes the new value of the realized resource.

Implementations§

Source§

impl FabricTransport

Source

pub fn new(fabric: EvalFabricRef) -> Self

A connected, empty transport over fabric (with its own kernel context).

Source

pub fn with(self, resource: Symbol, value: Expr) -> Self

Seed a resource value (builder form).

Source

pub fn set(&mut self, resource: Symbol, value: Expr)

Seed or replace a resource value.

Trait Implementations§

Source§

impl Transport for FabricTransport

Source§

fn kind(&self) -> TransportKind

Which kind of runtime this transport connects to.
Source§

fn status(&self) -> SessionStatus

The current connection status.
Source§

fn read(&self, resource: &Symbol) -> Result<Expr>

Read the current value of a resource.
Source§

fn realize(&mut self, resource: &Symbol, operation: &Expr) -> Result<Expr>

Realize a checked operation against a resource, returning the new value (the realize_final surface). Implementations also record a ChangeEvent for the resource.
Source§

fn drain_events(&mut self) -> Vec<ChangeEvent>

Drain the pending change events (the realize_events surface).
Source§

fn stream_subscribe( &mut self, _stream_id: &Symbol, ) -> Result<StreamInspectorRecord>

Subscribe to a stream and return browser-visible inspector data.
Source§

fn stream_read( &mut self, _stream_id: &Symbol, _limit: usize, ) -> Result<Vec<StreamItem>>

Read at most limit packets from a stream.
Source§

fn stream_push( &mut self, _stream_id: &Symbol, _envelope: StreamEnvelope, ) -> Result<PushResult>

Push one stream envelope.
Source§

fn stream_cancel(&mut self, _stream_id: &Symbol) -> Result<()>

Cancel a stream.
Source§

fn stream_stats(&self, _stream_id: &Symbol) -> Result<StreamStats>

Return current stream stats.
Source§

fn stream_inspector(&self, _stream_id: &Symbol) -> Result<StreamInspectorRecord>

Return browser-visible inspector data without changing stream state.

Auto Trait Implementations§

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