Trait DecodeRef

Source
pub trait DecodeRef<T: ?Sized> {
    // Required method
    fn decode_ref<'a>(
        &mut self,
        tag: Tag,
        input: &mut &'a [u8],
    ) -> Result<&'a T, Error>;
}
Expand description

Try to decode a field to a reference of the given type.

This trait is intended to be impl’d by the Decoder type.

Required Methods§

Source

fn decode_ref<'a>( &mut self, tag: Tag, input: &mut &'a [u8], ) -> Result<&'a T, Error>

Try to decode a reference to type T

Implementors§

Source§

impl<D> DecodeRef<str> for Decoder<D>
where D: Digest,

Source§

impl<D> DecodeRef<[u8]> for Decoder<D>
where D: Digest,