pub struct CreateStreamOptions { /* private fields */ }Expand description
Options for creating a stream within a compound file.
Implementations§
Source§impl CreateStreamOptions
impl CreateStreamOptions
Sourcepub fn buffer_size(self, size: usize) -> Self
pub fn buffer_size(self, size: usize) -> Self
Sets the buffer size to use when reading/writing the stream.
The buffer size determines how much data is read/written at a time when accessing the stream. A larger buffer size can improve performance for large streams, while a smaller buffer size can reduce memory usage.
Sourcepub fn overwrite(self, overwrite: bool) -> Self
pub fn overwrite(self, overwrite: bool) -> Self
Sets whether to overwrite an existing stream at the given path when creating the stream.
If overwrite is set to true, and a stream already exists at the
given path, the existing stream will be truncated to zero length.
If overwrite is set to false, and a stream already exists at the
given path, an error will be returned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CreateStreamOptions
impl RefUnwindSafe for CreateStreamOptions
impl Send for CreateStreamOptions
impl Sync for CreateStreamOptions
impl Unpin for CreateStreamOptions
impl UnwindSafe for CreateStreamOptions
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