pub struct DataGenOutput<'a> { /* private fields */ }
Implementations§
Source§impl<'a> DataGenOutput<'a>
impl<'a> DataGenOutput<'a>
pub fn new(writer: &'a mut dyn Write) -> DataGenOutput<'a>
pub fn write_bytes(&mut self, bytes: &[u8]) -> Result<u64>
pub fn write_string<D: Display + ?Sized>(&mut self, value: &D) -> Result<u64>
pub fn write<O: OutputType>(&mut self, value: &O) -> Result<u64, Error>
pub fn with<F, T>(&mut self, fun: F) -> Result<u64, Error>
pub fn flush(&mut self) -> Result<()>
Trait Implementations§
Source§impl<'a> ByteWriter for DataGenOutput<'a>
impl<'a> ByteWriter for DataGenOutput<'a>
Source§fn write_byte(&mut self, b: u8)
fn write_byte(&mut self, b: u8)
Writes a single byte.
Source§fn write_bytes(&mut self, v: &[u8])
fn write_bytes(&mut self, v: &[u8])
Writes a number of bytes.
Source§fn writer_hint(&mut self, _expectedlen: usize)
fn writer_hint(&mut self, _expectedlen: usize)
Hints an expected lower bound on the length (in bytes) of the output
until the next call to
writer_hint
,
so that the writer can reserve the memory for writing.
RawEncoder
s are recommended but not required to call this method
with an appropriate estimate.
By default this method does nothing.Auto Trait Implementations§
impl<'a> Freeze for DataGenOutput<'a>
impl<'a> !RefUnwindSafe for DataGenOutput<'a>
impl<'a> !Send for DataGenOutput<'a>
impl<'a> !Sync for DataGenOutput<'a>
impl<'a> Unpin for DataGenOutput<'a>
impl<'a> !UnwindSafe for DataGenOutput<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more