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§
Sourcetype AutoStreamFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
where
Self: 'a
type AutoStreamFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a
Auto-detection future for streaming format
Sourcetype ErrorResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
where
Self: 'a
type ErrorResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a
Error response future
Sourcetype HealthResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a
where
Self: 'a
type HealthResponseFuture<'a>: Future<Output = IntegrationResult<Self::Response>> + Send + 'a where Self: 'a
Health check response future
Required Methods§
Sourcefn auto_stream_response<'a>(
&'a self,
request: &'a UniversalRequest,
session_id: SessionId,
frames: Vec<StreamFrame>,
) -> Self::AutoStreamFuture<'a>
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
Sourcefn create_error_response<'a>(
&'a self,
status: u16,
message: String,
) -> Self::ErrorResponseFuture<'a>
fn create_error_response<'a>( &'a self, status: u16, message: String, ) -> Self::ErrorResponseFuture<'a>
Create an error response
Sourcefn create_health_response<'a>(&'a self) -> Self::HealthResponseFuture<'a>
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.