pub struct FileBufferingStreamWrapper { /* private fields */ }Expand description
File buffering stream wrapper. After wrap stream can be read multiple times
Implementations§
Source§impl FileBufferingStreamWrapper
impl FileBufferingStreamWrapper
pub fn new() -> Self
Sourcepub fn threshold(self, v: usize) -> Self
pub fn threshold(self, v: usize) -> Self
The maximum size in bytes of the in-memory used to buffer the stream. Larger bodies are written to disk
Sourcepub fn produce_chunk_size(self, v: usize) -> Self
pub fn produce_chunk_size(self, v: usize) -> Self
The chunk size for read buffered bodies
Sourcepub fn buffer_limit(self, v: Option<usize>) -> Self
pub fn buffer_limit(self, v: Option<usize>) -> Self
The maximum size in bytes of the body. An attempt to read beyond this limit will cause an error
pub fn wrap<S>(&self, inner: S) -> FileBufferingStream<S>
Trait Implementations§
Source§impl AsRef<FileBufferingStreamWrapper> for FileBufferingStreamWrapper
impl AsRef<FileBufferingStreamWrapper> for FileBufferingStreamWrapper
Source§fn as_ref(&self) -> &FileBufferingStreamWrapper
fn as_ref(&self) -> &FileBufferingStreamWrapper
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for FileBufferingStreamWrapper
impl RefUnwindSafe for FileBufferingStreamWrapper
impl Send for FileBufferingStreamWrapper
impl Sync for FileBufferingStreamWrapper
impl Unpin for FileBufferingStreamWrapper
impl UnwindSafe for FileBufferingStreamWrapper
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