pub trait JsonHostStreamSession: Debug + 'static {
// Required methods
fn send(
self: Rc<Self>,
message: Value,
) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>;
fn receive(
self: Rc<Self>,
) -> LocalBoxFuture<'static, Result<JsonStreamItem, RuntimeFailure>>;
fn close_send(
self: Rc<Self>,
) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>;
fn cancel(&self);
}Expand description
Adapter-neutral host Stream session exposed to a byte-oriented guest.
Required Methods§
fn send( self: Rc<Self>, message: Value, ) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>
fn receive( self: Rc<Self>, ) -> LocalBoxFuture<'static, Result<JsonStreamItem, RuntimeFailure>>
fn close_send( self: Rc<Self>, ) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>
fn cancel(&self)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".