pub struct StreamingConfig {
pub enable_chunked_transfer: bool,
pub chunk_threshold: usize,
pub chunk_size: usize,
pub enable_compression: bool,
pub compression_type: CompressionType,
pub enable_http2_server_push: bool,
pub streaming_timeout_ms: u64,
pub max_concurrent_chunks: usize,
pub backpressure_threshold: usize,
pub adaptive_chunk_sizing: bool,
pub http2_config: Http2Config,
}Expand description
Configuration for streaming HTTP transport
Fields§
§enable_chunked_transfer: boolEnable chunked transfer encoding for large requests
chunk_threshold: usizeThreshold in bytes to trigger chunked streaming
chunk_size: usizeChunk size for streaming operations
enable_compression: boolEnable compression support
compression_type: CompressionTypeCompression algorithm to use
enable_http2_server_push: boolEnable HTTP/2 Server Push if available
streaming_timeout_ms: u64Timeout for streaming operations
max_concurrent_chunks: usizeMaximum concurrent chunks
backpressure_threshold: usizeBackpressure threshold
adaptive_chunk_sizing: boolEnable adaptive chunk sizing
http2_config: Http2ConfigHTTP/2 specific configuration
Implementations§
Source§impl StreamingConfig
impl StreamingConfig
Sourcepub fn memory_improved() -> Self
pub fn memory_improved() -> Self
Configuration for memory-constrained environments
Sourcepub fn performance_improved() -> Self
pub fn performance_improved() -> Self
Configuration for high-performance scenarios
Sourcepub fn with_chunk_size(self, chunk_size: usize) -> Self
pub fn with_chunk_size(self, chunk_size: usize) -> Self
Builder method to set chunk size
Sourcepub fn with_compression_level(self, level: u8) -> Self
pub fn with_compression_level(self, level: u8) -> Self
Builder method to set compression level
Sourcepub fn with_max_concurrent_streams(self, max_streams: usize) -> Self
pub fn with_max_concurrent_streams(self, max_streams: usize) -> Self
Builder method to set max concurrent streams
Sourcepub fn compression_level(&self) -> u8
pub fn compression_level(&self) -> u8
Get compression level as u8 for tests
Sourcepub fn max_concurrent_streams(&self) -> usize
pub fn max_concurrent_streams(&self) -> usize
Get max concurrent streams (alias for max_concurrent_chunks)
Trait Implementations§
Source§impl Clone for StreamingConfig
impl Clone for StreamingConfig
Source§fn clone(&self) -> StreamingConfig
fn clone(&self) -> StreamingConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamingConfig
impl Debug for StreamingConfig
Auto Trait Implementations§
impl Freeze for StreamingConfig
impl RefUnwindSafe for StreamingConfig
impl Send for StreamingConfig
impl Sync for StreamingConfig
impl Unpin for StreamingConfig
impl UnsafeUnpin for StreamingConfig
impl UnwindSafe for StreamingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].