StreamingAdapterExt

Trait StreamingAdapterExt 

Source
pub trait StreamingAdapterExt: StreamingAdapter {
    type AutoStreamFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
       where Self: 'a;
    type ErrorResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
       where Self: 'a;
    type HealthResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
       where Self: 'a;

    // Required methods
    fn auto_stream_response<'a>(
        &'a self,
        request: &'a UniversalRequest,
        session_id: SessionId,
        frames: Vec<StreamFrame>,
    ) -> Self::AutoStreamFuture<'a>;
    fn create_error_response<'a>(
        &'a self,
        status: u16,
        message: String,
    ) -> Self::ErrorResponseFuture<'a>;
    fn create_health_response<'a>(&'a self) -> Self::HealthResponseFuture<'a>;
}
Expand description

Extension trait for additional convenience methods

Required Associated Types§

Source

type AutoStreamFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a

Auto-detection future for streaming format

Source

type ErrorResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a

Error response future

Source

type HealthResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a

Health check response future

Required Methods§

Source

fn auto_stream_response<'a>( &'a self, request: &'a UniversalRequest, session_id: SessionId, frames: Vec<StreamFrame>, ) -> Self::AutoStreamFuture<'a>

Auto-detect streaming format from request and create appropriate response

Source

fn create_error_response<'a>( &'a self, status: u16, message: String, ) -> Self::ErrorResponseFuture<'a>

Create an error response

Source

fn create_health_response<'a>(&'a self) -> Self::HealthResponseFuture<'a>

Create a health check response

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§