Skip to main content

ModelWebSocketEventSession

Trait ModelWebSocketEventSession 

Source
pub trait ModelWebSocketEventSession: Send {
    // Required method
    fn send_websocket_event_stream_incremental<'life0, 'async_trait>(
        &'life0 mut self,
        request: HttpRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ModelEventStream, ModelError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn reset<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Run-scoped WebSocket event transport session.

Required Methods§

Source

fn send_websocket_event_stream_incremental<'life0, 'async_trait>( &'life0 mut self, request: HttpRequest, ) -> Pin<Box<dyn Future<Output = Result<ModelEventStream, ModelError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Send a WebSocket model request and return JSON text-frame events as they arrive.

Provided Methods§

Source

fn reset<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Reset any reusable transport state held by the session.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§