Struct StreamResult
#[must_use = "Contains a status with potential error information"]
pub struct StreamResult { pub bytes_read: usize, pub bytes_written: usize, pub status: Result<()> }
The result of coding into an output stream.
Fields
bytes_read: usizeThe total number of bytes consumed from the reader.
bytes_written: usizeThe total number of bytes written into the writer.
status: Result<()>The possible error that occurred.
Note that when writing into streams it is not in general possible to recover from an error.
Trait Implementations
impl Debug for StreamResult
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl !RefUnwindSafe for StreamResult
impl !UnwindSafe for StreamResult
impl Freeze for StreamResult
impl Send for StreamResult
impl Sync for StreamResult
impl Unpin for StreamResult
impl UnsafeUnpin for StreamResult
Blanket Implementations
impl<T> Any for StreamResult
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for StreamResult
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for StreamResult
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for StreamResult
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for StreamResult
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for StreamResult
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for StreamResult
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>