pub fn encode<T: Encodable + ?Sized>(
        buf: &'a mut Vec<u8>,
        handles: &'a mut Vec<zx::Handle>,
        x: &mut T,
    ) -> Result<()> {
        let inline_size = round_up_to_align(x.inline_size(), 8);
        buf.truncate(0);
        buf.resize(inline_size, 0);
        handles.truncate(0);

        let mut encoder = Encoder { offset: 0, remaining_depth: MAX_RECURSION, buf, handles };

        x.encode(&mut encoder)
    }
/// FIDL2-encodes `x` into the provided data and handle buffers.
FIDL2-encodes `x` into the provided data and handle buffers.
FIDL2 - encodes ` x ` into the provided data and handle buffers .
pub fn encode<T: Encodable + ?Sized>(
        buf: &'a mut Vec<u8>,
        handles: &'a mut Vec<zx::Handle>,
        x: &mut T,
    ) -> Result<()> {
        let inline_size = round_up_to_align(x.inline_size(), 8);
        buf.truncate(0);
        buf.resize(inline_size, 0);
        handles.truncate(0);
        let mut encoder = Encoder { offset: 0, remaining_depth: MAX_RECURSION, buf, handles };
        x.encode(&mut encoder)
    }
pub fn encode < T : Encodable + ? Sized > ( buf : & ' a mut Vec < u8 > , handles : & ' a mut Vec < zx :: Handle > , x : & mut T , ) -> Result < ( ) > { let inline_size = round_up_to_align ( x . inline_size ( ) , 8 ) ; buf . truncate ( 0 ) ; buf . resize ( inline_size , 0 ) ; handles . truncate ( 0 ) ; let mut encoder = Encoder { offset : 0 , remaining_depth : MAX_RECURSION , buf , handles } ; x . encode ( & mut encoder ) }
FIDL2-encodes `x` into the provided data and handle buffers.
FIDL2 - encodes ` x ` into the provided data and handle buffers .
buf
&'a mut Vec<u8>
handles
&'a mut Vec<zx::Handle>
x
&mut T
buf
&'a mut Vec<u8>
handles
&'a mut Vec<zx::Handle>
x
&mut T