pub trait AsDecoderExt: for<'de> AsDecoder<'de> {
// Required methods
fn into_decoded<T>(self) -> Result<Decoded<T, Self>, DecodeError>
where Self: Sized + for<'de> AsDecoder<'de>,
T: Wire<Constraint = ()>,
<T as Wire>::Narrowed<'de>: for<'de> Decode<Self::Decoder, Constraint = ()>;
fn into_decoded_with_constraint<T>(
self,
constraint: <T as Constrained>::Constraint,
) -> Result<Decoded<T, Self>, DecodeError>
where Self: Sized + for<'de> AsDecoder<'de>,
T: Wire,
<T as Wire>::Narrowed<'de>: for<'de> Decode<Self::Decoder, Constraint = <T as Constrained>::Constraint>;
}Expand description
Extension methods for AsDecoder.
Required Methods§
Sourcefn into_decoded<T>(self) -> Result<Decoded<T, Self>, DecodeError>
fn into_decoded<T>(self) -> Result<Decoded<T, Self>, DecodeError>
Decodes a value from the decoder and finishes it.
On success, returns Ok of a Decoded value with the decoder. Returns Err if decoding
failed or the decoder finished with an error.
Sourcefn into_decoded_with_constraint<T>(
self,
constraint: <T as Constrained>::Constraint,
) -> Result<Decoded<T, Self>, DecodeError>where
Self: Sized + for<'de> AsDecoder<'de>,
T: Wire,
<T as Wire>::Narrowed<'de>: for<'de> Decode<Self::Decoder, Constraint = <T as Constrained>::Constraint>,
fn into_decoded_with_constraint<T>(
self,
constraint: <T as Constrained>::Constraint,
) -> Result<Decoded<T, Self>, DecodeError>where
Self: Sized + for<'de> AsDecoder<'de>,
T: Wire,
<T as Wire>::Narrowed<'de>: for<'de> Decode<Self::Decoder, Constraint = <T as Constrained>::Constraint>,
Decodes a value from the decoder and finishes it.
On success, returns Ok of a Decoded value with the decoder. Returns Err if decoding
failed or the decoder finished with an error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".