pub struct Ignore<A, M, 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, M, E: 'static> Context for Ignore<A, M, E>where
A: Allocator,
impl<A, M, E: 'static> Context for Ignore<A, M, E>where
A: Allocator,
Source§type Error = ErrorMarker
type Error = ErrorMarker
Error produced by context.
Source§type BufString<'this> = BufString<<A as Allocator>::Buf<'this>>
where
Self: 'this
type BufString<'this> = BufString<<A as Allocator>::Buf<'this>> where Self: 'this
An allocated buffer containing a valid string.
Source§fn collect_string<T>(
&self,
value: &T,
) -> Result<Self::BufString<'_>, Self::Error>
fn collect_string<T>( &self, value: &T, ) -> Result<Self::BufString<'_>, Self::Error>
Collect and allocate a string from a
Display implementation.Source§fn custom<T>(&self, _: T) -> ErrorMarker
fn custom<T>(&self, _: T) -> ErrorMarker
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>(&self, _: T) -> ErrorMarkerwhere
T: Display,
fn message<T>(&self, _: T) -> ErrorMarkerwhere
T: Display,
Report a message as an error. Read more
Source§fn decode<'de, T, D>(&self, decoder: D) -> Result<T, Self::Error>
fn decode<'de, T, D>(&self, decoder: D) -> Result<T, Self::Error>
Decode the given input using the associated mode.
Source§fn decode_unsized<'de, T, D, F, O>(
&self,
decoder: D,
f: F,
) -> Result<O, Self::Error>
fn decode_unsized<'de, T, D, F, O>( &self, decoder: D, f: F, ) -> Result<O, Self::Error>
Decode the given unsized value using the associated mode.
Source§fn decode_bytes<'de, T, D>(&self, decoder: D) -> Result<T, Self::Error>where
T: DecodeBytes<'de, Self::Mode>,
D: Decoder<'de, Cx = Self, Mode = Self::Mode, Error = Self::Error>,
fn decode_bytes<'de, T, D>(&self, decoder: D) -> Result<T, Self::Error>where
T: DecodeBytes<'de, Self::Mode>,
D: Decoder<'de, Cx = Self, Mode = Self::Mode, Error = Self::Error>,
Decode the given input as bytes using the associated mode.
Source§fn decode_unsized_bytes<'de, T, D, F, O>(
&self,
decoder: D,
f: F,
) -> Result<O, Self::Error>
fn decode_unsized_bytes<'de, T, D, F, O>( &self, decoder: D, f: F, ) -> Result<O, Self::Error>
Decode the given unsized value as bytes using the associated mode.
Source§fn map<T>(&self) -> impl FnOnce(T) -> Self::Error
fn map<T>(&self) -> impl FnOnce(T) -> Self::Error
Generate a map function which maps an error using the
custom function.Source§fn map_message<T>(&self) -> impl FnOnce(T) -> Self::Errorwhere
T: Display,
fn map_message<T>(&self) -> impl FnOnce(T) -> Self::Errorwhere
T: Display,
Generate a map function which maps an error using the
message function.Source§fn marked_message<T>(&self, mark: Self::Mark, message: T) -> Self::Errorwhere
T: Display,
fn marked_message<T>(&self, mark: Self::Mark, message: T) -> Self::Errorwhere
T: Display,
Report an error based on a mark. Read more
Source§fn marked_custom<T>(&self, mark: Self::Mark, message: T) -> Self::Error
fn marked_custom<T>(&self, mark: Self::Mark, message: T) -> Self::Error
Report an error based on a mark. Read more
Source§fn mark(&self) -> Self::Mark
fn mark(&self) -> Self::Mark
Return a mark which acts as a checkpoint at the current encoding state. Read more
Source§fn invalid_variant_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
fn invalid_variant_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
Report that an invalid variant tag was encountered.
Source§fn expected_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
fn expected_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
The value for the given tag could not be collected.
Source§fn uninhabitable(&self, _: &'static str) -> Self::Error
fn uninhabitable(&self, _: &'static str) -> Self::Error
Trying to decode an uninhabitable type.
Source§fn invalid_field_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
fn invalid_field_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
Encountered an unsupported field tag.
Source§fn expected_field_adjacent<T, C>(
&self,
_: &'static str,
tag: &T,
content: &C,
) -> Self::Error
fn expected_field_adjacent<T, C>( &self, _: &'static str, tag: &T, content: &C, ) -> Self::Error
Expected another field to decode.
Source§fn missing_adjacent_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
fn missing_adjacent_tag<T>(&self, _: &'static str, tag: &T) -> Self::Error
Missing adjacent tag when decoding.
Source§fn invalid_field_string_tag(
&self,
_: &'static str,
field: Self::Buf<'_>,
) -> Self::Error
fn invalid_field_string_tag( &self, _: &'static str, field: Self::Buf<'_>, ) -> Self::Error
Encountered an unsupported field tag.
Source§fn missing_variant_field<T>(&self, name: &'static str, tag: &T) -> Self::Error
fn missing_variant_field<T>(&self, name: &'static str, tag: &T) -> Self::Error
Missing variant field required to decode.
Source§fn missing_variant_tag(&self, name: &'static str) -> Self::Error
fn missing_variant_tag(&self, name: &'static str) -> Self::Error
Indicate that a variant tag could not be determined.
Source§fn invalid_variant_field_tag<V, T>(
&self,
name: &'static str,
variant: &V,
tag: &T,
) -> Self::Error
fn invalid_variant_field_tag<V, T>( &self, name: &'static str, variant: &V, tag: &T, ) -> Self::Error
Encountered an unsupported variant field.
Source§fn alloc_failed(&self) -> Self::Error
fn alloc_failed(&self) -> Self::Error
Missing variant field required to decode.
Source§fn enter_struct(&self, name: &'static str)
fn enter_struct(&self, name: &'static str)
Indicate that we’ve entered a struct with the given
name. Read moreSource§fn leave_struct(&self)
fn leave_struct(&self)
Trace that we’ve left the last struct that was entered.
Source§fn enter_enum(&self, name: &'static str)
fn enter_enum(&self, name: &'static str)
Indicate that we’ve entered an enum with the given
name. Read moreSource§fn leave_enum(&self)
fn leave_enum(&self)
Trace that we’ve left the last enum that was entered.
Source§fn enter_named_field<T>(&self, name: &'static str, tag: &T)
fn enter_named_field<T>(&self, name: &'static str, tag: &T)
Trace that we’ve entered the given named field. Read more
Source§fn enter_unnamed_field<T>(&self, index: u32, name: &T)
fn enter_unnamed_field<T>(&self, index: u32, name: &T)
Trace that we’ve entered the given unnamed field. Read more
Source§fn leave_field(&self)
fn leave_field(&self)
Trace that we’ve left the last field that was entered. Read more
Source§fn enter_variant<T>(&self, name: &'static str, tag: T)where
T: Display,
fn enter_variant<T>(&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(&self)
fn leave_variant(&self)
Trace that we’ve left the last variant that was entered. Read more
Source§fn enter_map_key<T>(&self, field: T)where
T: Display,
fn enter_map_key<T>(&self, field: T)where
T: Display,
Trace a that a map key has been entered.
Source§fn leave_map_key(&self)
fn leave_map_key(&self)
Trace that we’ve left the last map field that was entered. Read more
Source§fn enter_sequence_index(&self, index: usize)
fn enter_sequence_index(&self, index: usize)
Trace a sequence field.
Source§fn leave_sequence_index(&self)
fn leave_sequence_index(&self)
Trace that we’ve left the last sequence index that was entered. Read more
Auto Trait Implementations§
impl<A, M, E> !Freeze for Ignore<A, M, E>
impl<A, M, E> !RefUnwindSafe for Ignore<A, M, E>
impl<A, M, E> Send for Ignore<A, M, E>
impl<A, M, E> !Sync for Ignore<A, M, E>
impl<A, M, E> Unpin for Ignore<A, M, E>
impl<A, M, E> UnwindSafe for Ignore<A, M, E>
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