pub struct EncodeClosure<FN>(/* private fields */)
where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>;
Expand description
A wrapper for an closure making it implement EncodableInHeader
.
Implementations§
Source§impl<FN> EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
impl<FN> EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
pub fn new(closure: FN) -> EncodeClosure<FN>
Trait Implementations§
Source§impl<FN> Clone for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
impl<FN> Clone for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
Source§fn clone(&self) -> EncodeClosure<FN>
fn clone(&self) -> EncodeClosure<FN>
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<FN> Debug for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
impl<FN> Debug for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
Source§impl<FN> EncodableInHeader for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
impl<FN> EncodableInHeader for EncodeClosure<FN>where
FN: 'static + Send + Sync + for<'a, 'b> Fn(&'a mut EncodingWriter<'b>) -> Result<(), EncodingError>,
fn encode(&self, encoder: &mut EncodingWriter<'_>) -> Result<(), EncodingError>
fn boxed_clone(&self) -> Box<dyn EncodableInHeader>
Auto Trait Implementations§
impl<FN> Freeze for EncodeClosure<FN>
impl<FN> RefUnwindSafe for EncodeClosure<FN>where
FN: RefUnwindSafe,
impl<FN> Send for EncodeClosure<FN>
impl<FN> Sync for EncodeClosure<FN>
impl<FN> Unpin for EncodeClosure<FN>
impl<FN> UnwindSafe for EncodeClosure<FN>where
FN: RefUnwindSafe,
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