pub struct MakeFatalError<E: Encode>(/* private fields */);Expand description
Auxiliary to make any given error resolve to is_fatal_error() == true.
Trait Implementations§
Source§impl<E> Encode for MakeFatalError<E>
impl<E> Encode for MakeFatalError<E>
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<E: Encode> From<E> for MakeFatalError<E>
impl<E: Encode> From<E> for MakeFatalError<E>
Source§impl<E: Encode> IsFatalError for MakeFatalError<E>
impl<E: Encode> IsFatalError for MakeFatalError<E>
Source§fn is_fatal_error(&self) -> bool
fn is_fatal_error(&self) -> bool
Is this a fatal error?
impl<E> EncodeLike for MakeFatalError<E>
Auto Trait Implementations§
impl<E> Freeze for MakeFatalError<E>where
E: Freeze,
impl<E> RefUnwindSafe for MakeFatalError<E>where
E: RefUnwindSafe,
impl<E> Send for MakeFatalError<E>where
E: Send,
impl<E> Sync for MakeFatalError<E>where
E: Sync,
impl<E> Unpin for MakeFatalError<E>where
E: Unpin,
impl<E> UnwindSafe for MakeFatalError<E>where
E: 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