Skip to main content

JsonHostStreamSession

Trait JsonHostStreamSession 

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

Source

fn send( self: Rc<Self>, message: Value, ) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>

Source

fn receive( self: Rc<Self>, ) -> LocalBoxFuture<'static, Result<JsonStreamItem, RuntimeFailure>>

Source

fn close_send( self: Rc<Self>, ) -> LocalBoxFuture<'static, Result<(), RuntimeFailure>>

Source

fn cancel(&self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§