pub trait Decoder {
// Required method
fn decode<'t, IN: AsRef<[u8]>>(
bin: &'t mut [u8],
encoded: IN,
ignore: Option<&[u8]>,
) -> Result<&'t [u8], Error>;
// Provided method
fn decode_to_vec<IN: AsRef<[u8]>>(
encoded: IN,
ignore: Option<&[u8]>,
) -> Result<Vec<u8>, Error> { ... }
}
Required Methods§
sourcefn decode<'t, IN: AsRef<[u8]>>(
bin: &'t mut [u8],
encoded: IN,
ignore: Option<&[u8]>,
) -> Result<&'t [u8], Error>
fn decode<'t, IN: AsRef<[u8]>>( bin: &'t mut [u8], encoded: IN, ignore: Option<&[u8]>, ) -> Result<&'t [u8], Error>
Decode encoded
into bin
.
The output buffer can be larger than required; the returned slice is
a view of the buffer with the correct length.
ignore
is an optional set of characters to ignore.
Provided Methods§
Object Safety§
This trait is not object safe.