Skip to main content

JsonStreamSessionTransport

Trait JsonStreamSessionTransport 

Source
pub trait JsonStreamSessionTransport: Debug + 'static {
    // Required methods
    fn send(
        self: Rc<Self>,
        message_json: String,
    ) -> 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-owned transport session for the portable JSON Stream ABI.

Required Methods§

Source

fn send( self: Rc<Self>, message_json: String, ) -> 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§