Struct custom_print::ConcatWriter
source · pub struct ConcatWriter<F1>(_);
Expand description
Implementations§
source§impl<F1> ConcatWriter<F1>where
F1: WriteStr,
impl<F1> ConcatWriter<F1>where F1: WriteStr,
sourcepub fn new(write: F1) -> Self
pub fn new(write: F1) -> Self
Creates a new ConcatWriter
from an object that implements WriteStr
.
sourcepub fn from_closure<F, Ts>(closure: F) -> Selfwhere
F: IntoWriteFn<Ts, WriteFn = F1>,
pub fn from_closure<F, Ts>(closure: F) -> Selfwhere F: IntoWriteFn<Ts, WriteFn = F1>,
Creates a new ConcatWriter
with a WriteStr
wrapper
deduced with IntoWriteFn
by the closure signature and constructed from it.
source§impl<F1> ConcatWriter<F1>where
Self: WriteStr,
impl<F1> ConcatWriter<F1>where Self: WriteStr,
sourcepub fn write_fmt(&mut self, args: Arguments<'_>) -> <Self as WriteStr>::Output
pub fn write_fmt(&mut self, args: Arguments<'_>) -> <Self as WriteStr>::Output
Writes a formatted string into this writer.
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§
source§impl<F1: Clone> Clone for ConcatWriter<F1>
impl<F1: Clone> Clone for ConcatWriter<F1>
source§fn clone(&self) -> ConcatWriter<F1>
fn clone(&self) -> ConcatWriter<F1>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<F1: Debug> Debug for ConcatWriter<F1>
impl<F1: Debug> Debug for ConcatWriter<F1>
source§impl<F1: PartialEq> PartialEq<ConcatWriter<F1>> for ConcatWriter<F1>
impl<F1: PartialEq> PartialEq<ConcatWriter<F1>> for ConcatWriter<F1>
source§fn eq(&self, other: &ConcatWriter<F1>) -> bool
fn eq(&self, other: &ConcatWriter<F1>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<F1, Output> WriteBytes for ConcatWriter<F1>where
F1: WriteBytes,
F1::Output: ExpectConcatWriteResult<Output = Output>,
impl<F1, Output> WriteBytes for ConcatWriter<F1>where F1: WriteBytes, F1::Output: ExpectConcatWriteResult<Output = Output>,
source§impl<F1, Output> WriteStr for ConcatWriter<F1>where
F1: WriteStr,
F1::Output: ExpectConcatWriteResult<Output = Output>,
impl<F1, Output> WriteStr for ConcatWriter<F1>where F1: WriteStr, F1::Output: ExpectConcatWriteResult<Output = Output>,
impl<F1: Copy> Copy for ConcatWriter<F1>
impl<F1: Eq> Eq for ConcatWriter<F1>
impl<F1> StructuralEq for ConcatWriter<F1>
impl<F1> StructuralPartialEq for ConcatWriter<F1>
Auto Trait Implementations§
impl<F1> RefUnwindSafe for ConcatWriter<F1>where F1: RefUnwindSafe,
impl<F1> Send for ConcatWriter<F1>where F1: Send,
impl<F1> Sync for ConcatWriter<F1>where F1: Sync,
impl<F1> Unpin for ConcatWriter<F1>where F1: Unpin,
impl<F1> UnwindSafe for ConcatWriter<F1>where F1: 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