pub trait AsDecoderExt: for<'de> AsDecoder<'de> {
// Required methods
fn into_decoded<T>(self) -> Result<Decoded<T, Self>, DecodeError>
where Self: for<'de> AsDecoder<'de> + Sized,
T: Wire<Constraint = ()>,
for<'de> T::Narrowed<'de>: Decode<<Self as AsDecoder<'de>>::Decoder, Constraint = ()>;
fn into_decoded_with_constraint<T>(
self,
constraint: T::Constraint,
) -> Result<Decoded<T, Self>, DecodeError>
where Self: for<'de> AsDecoder<'de> + Sized,
T: Wire,
for<'de> T::Narrowed<'de>: Decode<<Self as AsDecoder<'de>>::Decoder, Constraint = T::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::Constraint,
) -> Result<Decoded<T, Self>, DecodeError>
fn into_decoded_with_constraint<T>( self, constraint: T::Constraint, ) -> 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.