Struct custom_print::FmtTryWriter [−][src]
pub struct FmtTryWriter<F1>(_);
Expand description
A writer that calls write_str
for each formatted chunk, but do not require allocations.
Write function can return either ()
or fmt::Result
.
Writer propagates error to the caller if the write function returns Result::Err
.
Note that the error context will be lost, because fmt::Error
does not support transmission of an error other than that an error occurred.
Implementations
Creates a new FmtTryWriter
from an object that implements WriteStr
.
Creates a new FmtTryWriter
with a WriteStr
wrapper
deduced with IntoTryWriteFn
by the closure signature and constructed from it.
Writes a formatted string into this writer, returning any error encountered.
This method is primarily used to interface with the format_args!
macro,
but it is rare that this should explicitly be called.
The write!
macro should be favored to invoke this method instead.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Writes a string slice into this writer, returning whether the write succeeded. Read more
impl<F1> WriteBytes for FmtTryWriter<F1> where
F1: WriteBytes,
F1::Output: IntoFmtWriteResult,
[src]
impl<F1> WriteBytes for FmtTryWriter<F1> where
F1: WriteBytes,
F1::Output: IntoFmtWriteResult,
[src]Auto Trait Implementations
impl<F1> RefUnwindSafe for FmtTryWriter<F1> where
F1: RefUnwindSafe,
impl<F1> Send for FmtTryWriter<F1> where
F1: Send,
impl<F1> Sync for FmtTryWriter<F1> where
F1: Sync,
impl<F1> Unpin for FmtTryWriter<F1> where
F1: Unpin,
impl<F1> UnwindSafe for FmtTryWriter<F1> where
F1: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more