pub fn decode_into<T: Decodable>(
        buf: &'a [u8],
        handles: &'a mut [zx::Handle],
        value: &mut T,
    ) -> Result<()> {
        let out_of_line_offset = round_up_to_align(T::inline_size(), 8);
        if buf.len() < out_of_line_offset {
            return Err(Error::OutOfRange);
        }

        let (buf, out_of_line_buf) = buf.split_at(out_of_line_offset);

        let mut decoder = Decoder {
            remaining_depth: MAX_RECURSION,
            buf,
            initial_buf_len: buf.len(),
            out_of_line_buf,
            initial_out_of_line_buf_len: out_of_line_buf.len(),
            handles,
        };
        value.decode(&mut decoder)?;
        if decoder.out_of_line_buf.len() != 0 {
            return Err(Error::ExtraBytes);
        }
        if decoder.handles.len() != 0 {
            return Err(Error::ExtraHandles);
        }
        Ok(())
    }
/// FIDL2-decodes a value of type `T` from the provided data and handle buffers.
FIDL2-decodes a value of type `T` from the provided data and handle buffers.
FIDL2 - decodes a value of type ` T ` from the provided data and handle buffers .
pub fn decode_into<T: Decodable>(
        buf: &'a [u8],
        handles: &'a mut [zx::Handle],
        value: &mut T,
    ) -> Result<()> {
        let out_of_line_offset = round_up_to_align(T::inline_size(), 8);
        if buf.len() < out_of_line_offset {
            return Err(Error::OutOfRange);
        }
        let (buf, out_of_line_buf) = buf.split_at(out_of_line_offset);
        let mut decoder = Decoder {
            remaining_depth: MAX_RECURSION,
            buf,
            initial_buf_len: buf.len(),
            out_of_line_buf,
            initial_out_of_line_buf_len: out_of_line_buf.len(),
            handles,
        };
        value.decode(&mut decoder)?;
        if decoder.out_of_line_buf.len() != 0 {
            return Err(Error::ExtraBytes);
        }
        if decoder.handles.len() != 0 {
            return Err(Error::ExtraHandles);
        }
        Ok(())
    }
pub fn decode_into < T : Decodable > ( buf : & ' a [ u8 ] , handles : & ' a mut [ zx :: Handle ] , value : & mut T , ) -> Result < ( ) > { let out_of_line_offset = round_up_to_align ( T :: inline_size ( ) , 8 ) ; if buf . len ( ) < out_of_line_offset { return Err ( Error :: OutOfRange ) ; } let ( buf , out_of_line_buf ) = buf . split_at ( out_of_line_offset ) ; let mut decoder = Decoder { remaining_depth : MAX_RECURSION , buf , initial_buf_len : buf . len ( ) , out_of_line_buf , initial_out_of_line_buf_len : out_of_line_buf . len ( ) , handles , } ; value . decode ( & mut decoder ) ? ; if decoder . out_of_line_buf . len ( ) != 0 { return Err ( Error :: ExtraBytes ) ; } if decoder . handles . len ( ) != 0 { return Err ( Error :: ExtraHandles ) ; } Ok ( ( ) ) }
FIDL2-decodes a value of type `T` from the provided data and handle buffers.
FIDL2 - decodes a value of type ` T ` from the provided data and handle buffers .
buf
&'a [u8]
handles
&'a mut [zx::Handle]
value
&mut T
buf
&'a [u8]
handles
&'a mut [zx::Handle]
value
&mut T