pub struct Ignore<A, E> { /* private fields */ }Expand description
A simple non-diagnostical capturing context which ignores the error and loses all information about it (except that it happened).
Implementations§
Trait Implementations§
Source§impl<A, E> Context for Ignore<A, E>where
A: Allocator,
impl<A, E> Context for Ignore<A, E>where
A: Allocator,
Source§fn custom<T>(&mut self, _: T) -> Error
fn custom<T>(&mut self, _: T) -> Error
Report a custom error, which is not encapsulated by the error type
expected by the context. This is essentially a type-erased way of
reporting error-like things out from the context.
Source§fn message<T>(&mut self, _: T) -> Errorwhere
T: Display,
fn message<T>(&mut self, _: T) -> Errorwhere
T: Display,
Report a message as an error. Read more
Source§fn adapt<E>(&mut self) -> &mut Adapt<Self, E>
fn adapt<E>(&mut self) -> &mut Adapt<Self, E>
Adapt the current context so that it can convert an error from a
different type convertible to the current input Read more
Source§fn marked_report<T>(&mut self, mark: Self::Mark, error: T) -> Self::Error
fn marked_report<T>(&mut self, mark: Self::Mark, error: T) -> Self::Error
Report the given encoding error from the given mark.
Source§fn marked_message<T>(&mut self, mark: Self::Mark, message: T) -> Self::Errorwhere
T: Display,
fn marked_message<T>(&mut self, mark: Self::Mark, message: T) -> Self::Errorwhere
T: Display,
Report an error based on a mark. Read more
Source§fn mark(&mut self) -> Self::Mark
fn mark(&mut self) -> Self::Mark
Return a mark which acts as a checkpoint at the current encoding state. Read more
Source§fn invalid_variant_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
fn invalid_variant_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
Report that an invalid variant tag was encountered.
Source§fn expected_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
fn expected_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
The value for the given tag could not be collected.
Source§fn uninhabitable(&mut self, _: &'static str) -> Self::Error
fn uninhabitable(&mut self, _: &'static str) -> Self::Error
Trying to decode an uninhabitable type.
Source§fn invalid_field_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
fn invalid_field_tag<T>(&mut self, _: &'static str, tag: T) -> Self::Errorwhere
T: Debug,
Encountered an unsupported field tag.
Source§fn invalid_field_string_tag(
&mut self,
_: &'static str,
field: Self::Buf,
) -> Self::Error
fn invalid_field_string_tag( &mut self, _: &'static str, field: Self::Buf, ) -> Self::Error
Encountered an unsupported field tag.
Source§fn missing_variant_field<T>(
&mut self,
name: &'static str,
tag: T,
) -> Self::Errorwhere
T: Debug,
fn missing_variant_field<T>(
&mut self,
name: &'static str,
tag: T,
) -> Self::Errorwhere
T: Debug,
Missing variant field required to decode.
Source§fn missing_variant_tag(&mut self, name: &'static str) -> Self::Error
fn missing_variant_tag(&mut self, name: &'static str) -> Self::Error
Indicate that a variant tag could not be determined.
Source§fn invalid_variant_field_tag<V, T>(
&mut self,
name: &'static str,
variant: V,
tag: T,
) -> Self::Error
fn invalid_variant_field_tag<V, T>( &mut self, name: &'static str, variant: V, tag: T, ) -> Self::Error
Encountered an unsupported variant field.
Source§fn enter_struct(&mut self, name: &'static str)
fn enter_struct(&mut self, name: &'static str)
Indicate that we’ve entered a struct with the given
name. Read moreSource§fn leave_struct(&mut self)
fn leave_struct(&mut self)
Trace that we’ve left the last struct that was entered.
Source§fn enter_enum(&mut self, name: &'static str)
fn enter_enum(&mut self, name: &'static str)
Indicate that we’ve entered an enum with the given
name. Read moreSource§fn leave_enum(&mut self)
fn leave_enum(&mut self)
Trace that we’ve left the last enum that was entered.
Source§fn enter_named_field<T>(&mut self, name: &'static str, tag: T)where
T: Display,
fn enter_named_field<T>(&mut self, name: &'static str, tag: T)where
T: Display,
Trace that we’ve entered the given named field. Read more
Source§fn enter_unnamed_field<T>(&mut self, index: u32, tag: T)where
T: Display,
fn enter_unnamed_field<T>(&mut self, index: u32, tag: T)where
T: Display,
Trace that we’ve entered the given unnamed field. Read more
Source§fn leave_field(&mut self)
fn leave_field(&mut self)
Trace that we’ve left the last field that was entered. Read more
Source§fn enter_variant<T>(&mut self, name: &'static str, tag: T)where
T: Display,
fn enter_variant<T>(&mut self, name: &'static str, tag: T)where
T: Display,
Trace that we’ve entered the given variant in an enum. Read more
Source§fn leave_variant(&mut self)
fn leave_variant(&mut self)
Trace that we’ve left the last variant that was entered. Read more
Source§fn enter_map_key<T>(&mut self, field: T)where
T: Display,
fn enter_map_key<T>(&mut self, field: T)where
T: Display,
Trace a that a map key has been entered.
Source§fn leave_map_key(&mut self)
fn leave_map_key(&mut self)
Trace that we’ve left the last map field that was entered. Read more
Source§fn enter_sequence_index(&mut self, index: usize)
fn enter_sequence_index(&mut self, index: usize)
Trace a sequence field.
Source§fn leave_sequence_index(&mut self)
fn leave_sequence_index(&mut self)
Trace that we’ve left the last sequence index that was entered. Read more
Auto Trait Implementations§
impl<A, E> Freeze for Ignore<A, E>where
A: Freeze,
impl<A, E> RefUnwindSafe for Ignore<A, E>where
A: RefUnwindSafe,
E: RefUnwindSafe,
impl<A, E> Send for Ignore<A, E>
impl<A, E> Sync for Ignore<A, E>
impl<A, E> Unpin for Ignore<A, E>
impl<A, E> UnwindSafe for Ignore<A, E>where
A: UnwindSafe,
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