pub struct WriterOutcome {
pub writer: Box<dyn Write>,
pub io_error: Option<Error>,
pub discarded: bool,
}Expand description
The reclaimed writer and deferred outcomes of a writer-backed
Output, returned by Output::into_writer.
discarded is true when librnp closed the stream with a discard
request — i.e. the enclosing operation failed (or the output was
dropped without Output::finish) and librnp asked for the already
written bytes to be deleted. The writer was not flushed in that case;
a generic std::io::Write cannot delete data, so the request is
surfaced here for the caller to act on (e.g. remove the partial file).
Fields§
§writer: Box<dyn Write>The writer handed to Output::to_writer, closed and (unless
discarded) flushed.
io_error: Option<Error>The deferred std::io::Error from the failed write or flush, if
any.
discarded: boolWhether librnp asked for the written data to be discarded.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WriterOutcome
impl !Send for WriterOutcome
impl !Sync for WriterOutcome
impl !UnwindSafe for WriterOutcome
impl Freeze for WriterOutcome
impl Unpin for WriterOutcome
impl UnsafeUnpin for WriterOutcome
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