pub struct StreamConfigBuilder { /* private fields */ }Expand description
Builder for StreamConfig
Provides ergonomic configuration of streaming behavior.
Implementations§
Source§impl StreamConfigBuilder
impl StreamConfigBuilder
Sourcepub fn buffer_size(self, size: usize) -> Self
pub fn buffer_size(self, size: usize) -> Self
Set the buffer size in bytes
Sourcepub fn max_object_bytes(self, limit: usize) -> Self
pub fn max_object_bytes(self, limit: usize) -> Self
Set the maximum object size in bytes
Sourcepub fn unlimited_object_size(self) -> Self
pub fn unlimited_object_size(self) -> Self
Disable object size limit (use with caution)
Sourcepub fn from_json_config(self, config: FromJsonConfig) -> Self
pub fn from_json_config(self, config: FromJsonConfig) -> Self
Set the JSON conversion configuration
Sourcepub fn use_size_estimation(self, enabled: bool) -> Self
pub fn use_size_estimation(self, enabled: bool) -> Self
Enable or disable size estimation optimization
Sourcepub fn true_streaming(self, enabled: bool) -> Self
pub fn true_streaming(self, enabled: bool) -> Self
Enable or disable true streaming (constant memory)
Sourcepub fn build(self) -> StreamConfig
pub fn build(self) -> StreamConfig
Build the configuration
Trait Implementations§
Source§impl Clone for StreamConfigBuilder
impl Clone for StreamConfigBuilder
Source§fn clone(&self) -> StreamConfigBuilder
fn clone(&self) -> StreamConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · 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 StreamConfigBuilder
impl Debug for StreamConfigBuilder
Auto Trait Implementations§
impl Freeze for StreamConfigBuilder
impl RefUnwindSafe for StreamConfigBuilder
impl Send for StreamConfigBuilder
impl Sync for StreamConfigBuilder
impl Unpin for StreamConfigBuilder
impl UnwindSafe for StreamConfigBuilder
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