Struct custom_print::WriteStrFn
source · pub struct WriteStrFn<F, R>(_)
where
F: FnMut(&str) -> R;
Expand description
A wrapper for write functions for<R> FnMut(&str) -> R
.
It implements WriteStr
trait and can be used in conjunction with IntoWriteFn
and IntoTryWriteFn
traits to simplify type inference.
Implementations§
Trait Implementations§
source§impl<F, R: Clone> Clone for WriteStrFn<F, R>where
F: FnMut(&str) -> R + Clone,
impl<F, R: Clone> Clone for WriteStrFn<F, R>where F: FnMut(&str) -> R + Clone,
source§fn clone(&self) -> WriteStrFn<F, R>
fn clone(&self) -> WriteStrFn<F, R>
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<F, R: PartialEq> PartialEq<WriteStrFn<F, R>> for WriteStrFn<F, R>where
F: FnMut(&str) -> R + PartialEq,
impl<F, R: PartialEq> PartialEq<WriteStrFn<F, R>> for WriteStrFn<F, R>where F: FnMut(&str) -> R + PartialEq,
source§fn eq(&self, other: &WriteStrFn<F, R>) -> bool
fn eq(&self, other: &WriteStrFn<F, R>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<F, R: Copy> Copy for WriteStrFn<F, R>where F: FnMut(&str) -> R + Copy,
impl<F, R: Eq> Eq for WriteStrFn<F, R>where F: FnMut(&str) -> R + Eq,
impl<F, R> StructuralEq for WriteStrFn<F, R>where F: FnMut(&str) -> R,
impl<F, R> StructuralPartialEq for WriteStrFn<F, R>where F: FnMut(&str) -> R,
Auto Trait Implementations§
impl<F, R> RefUnwindSafe for WriteStrFn<F, R>where F: RefUnwindSafe,
impl<F, R> Send for WriteStrFn<F, R>where F: Send,
impl<F, R> Sync for WriteStrFn<F, R>where F: Sync,
impl<F, R> Unpin for WriteStrFn<F, R>where F: Unpin,
impl<F, R> UnwindSafe for WriteStrFn<F, R>where F: 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