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