Struct postcard::ser_flavors::io::WriteFlavor
source · pub struct WriteFlavor<T> { /* private fields */ }
Expand description
Wrapper over a std::io::Write that implements the flavor trait
Implementations§
source§impl<T> WriteFlavor<T>where
T: Write,
impl<T> WriteFlavor<T>where
T: Write,
sourcepub fn new(writer: T) -> Self
pub fn new(writer: T) -> Self
Create a new Self flavor from a given std::io::Write
Trait Implementations§
source§impl<T> Flavor for WriteFlavor<T>where
T: Write,
impl<T> Flavor for WriteFlavor<T>where
T: Write,
source§type Output = T
type Output = T
The
Output
type is what this storage “resolves” to when the serialization is complete,
such as a slice or a Vec of some sort.source§fn try_push(&mut self, data: u8) -> Result<()>
fn try_push(&mut self, data: u8) -> Result<()>
The try_push() trait method can be used to push a single byte to be modified and/or stored
Auto Trait Implementations§
impl<T> Freeze for WriteFlavor<T>where
T: Freeze,
impl<T> RefUnwindSafe for WriteFlavor<T>where
T: RefUnwindSafe,
impl<T> Send for WriteFlavor<T>where
T: Send,
impl<T> Sync for WriteFlavor<T>where
T: Sync,
impl<T> Unpin for WriteFlavor<T>where
T: Unpin,
impl<T> UnwindSafe for WriteFlavor<T>where
T: UnwindSafe,
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