pub struct RemoteTransport { /* private fields */ }Expand description
A network-backed transport that connects a runtime over realize.
Implementations§
Source§impl RemoteTransport
impl RemoteTransport
Sourcepub fn local_server(endpoint: impl Into<String>) -> Self
pub fn local_server(endpoint: impl Into<String>) -> Self
A local-server transport (HTTP bootstrap + WebSocket live).
Sourcepub fn remote_server(endpoint: impl Into<String>) -> Self
pub fn remote_server(endpoint: impl Into<String>) -> Self
A remote-server transport (HTTP bootstrap + WebSocket live).
Sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Mark the remote channel disconnected.
Sourcepub fn begin_reconnect(&mut self)
pub fn begin_reconnect(&mut self)
Mark the remote channel reconnecting.
Sourcepub fn stream_control_frame(
&self,
cx: &mut Cx,
codec: Symbol,
control: &StreamControl,
) -> Result<ServerFrame>
pub fn stream_control_frame( &self, cx: &mut Cx, codec: Symbol, control: &StreamControl, ) -> Result<ServerFrame>
Encode a stream-fabric control frame for server-backed transports.
Trait Implementations§
Source§impl Transport for RemoteTransport
impl Transport for RemoteTransport
Source§fn kind(&self) -> TransportKind
fn kind(&self) -> TransportKind
Which kind of runtime this transport connects to.
Source§fn status(&self) -> SessionStatus
fn status(&self) -> SessionStatus
The current connection status.
Source§fn realize(&mut self, _resource: &Symbol, _operation: &Expr) -> Result<Expr>
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>
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>
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>>
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>
fn stream_push( &mut self, stream_id: &Symbol, _envelope: StreamEnvelope, ) -> Result<PushResult>
Push one stream envelope.
Source§fn stream_stats(&self, stream_id: &Symbol) -> Result<StreamStats>
fn stream_stats(&self, stream_id: &Symbol) -> Result<StreamStats>
Return current stream stats.
Source§fn stream_inspector(&self, stream_id: &Symbol) -> Result<StreamInspectorRecord>
fn stream_inspector(&self, stream_id: &Symbol) -> Result<StreamInspectorRecord>
Return browser-visible inspector data without changing stream state.
Auto Trait Implementations§
impl Freeze for RemoteTransport
impl RefUnwindSafe for RemoteTransport
impl Send for RemoteTransport
impl Sync for RemoteTransport
impl Unpin for RemoteTransport
impl UnsafeUnpin for RemoteTransport
impl UnwindSafe for RemoteTransport
Blanket Implementations§
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