pub trait Decoder<'buf>: InternalHandleDecoder {
// Required methods
fn take_chunks(
&mut self,
count: usize,
) -> Result<&'buf mut [Chunk], DecodeError>;
fn finish(&mut self) -> Result<(), DecodeError>;
}
Expand description
A decoder for FIDL messages.
Required Methods§
Sourcefn take_chunks(
&mut self,
count: usize,
) -> Result<&'buf mut [Chunk], DecodeError>
fn take_chunks( &mut self, count: usize, ) -> Result<&'buf mut [Chunk], DecodeError>
Takes a slice of Chunk
s from the decoder.
Returns Err
if the decoder doesn’t have enough chunks left.
Sourcefn finish(&mut self) -> Result<(), DecodeError>
fn finish(&mut self) -> Result<(), DecodeError>
Finishes decoding.
Returns Err
if the decoder did not finish successfully.