pub struct WriteSource { /* private fields */ }Expand description
A source of byte chunks consumed by a streamed write.
Implementations§
Source§impl WriteSource
impl WriteSource
Sourcepub fn new(source: impl Stream<Item = FsResult<Bytes>> + Send + 'static) -> Self
pub fn new(source: impl Stream<Item = FsResult<Bytes>> + Send + 'static) -> Self
Wraps a sendable stream of byte chunks and filesystem errors.
Sourcepub fn from_bytes(bytes: impl Into<Bytes>) -> Self
pub fn from_bytes(bytes: impl Into<Bytes>) -> Self
Creates a one-chunk source from in-memory bytes.
Sourcepub fn into_stream(self) -> ByteStream
pub fn into_stream(self) -> ByteStream
Returns the wrapped stream.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WriteSource
impl !Sync for WriteSource
impl !UnwindSafe for WriteSource
impl Freeze for WriteSource
impl Send for WriteSource
impl Unpin for WriteSource
impl UnsafeUnpin for WriteSource
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