pub fn encode_with_context<T: Encodable + ?Sized>(
        context: &Context,
        buf: &'a mut Vec<u8>,
        handles: &'a mut Vec<Handle>,
        x: &mut T,
    ) -> Result<()> {
        fn prepare_for_encoding<'a>(
            context: &'a Context,
            buf: &'a mut Vec<u8>,
            handles: &'a mut Vec<Handle>,
            ty_inline_size: usize,
        ) -> Encoder<'a> {
            let inline_size = round_up_to_align(ty_inline_size, 8);
            buf.truncate(0);
            buf.resize(inline_size, 0);
            handles.truncate(0);
            Encoder { offset: 0, remaining_depth: MAX_RECURSION, buf, handles, context }
        }

        let mut encoder = prepare_for_encoding(context, buf, handles, x.inline_size(context));
        x.encode(&mut encoder)
    }
/// FIDL2-encodes `x` into the provided data and handle buffers, using the
/// specified encoding context.
///
/// WARNING: Do not call this directly unless you know what you're doing.
/// FIDL uses `Context` to coordinate soft migrations, so improper uses of
/// this function could result in ABI breakage.
FIDL2-encodes `x` into the provided data and handle buffers, using the
specified encoding context.

Do not call this directly unless you know what you're doing.
FIDL uses `Context` to coordinate soft migrations, so improper uses of
this function could result in ABI breakage.
FIDL2 - encodes ` x ` into the provided data and handle buffers using the specified encoding context . Do not call this directly unless you know what you ' re doing . FIDL uses ` Context ` to coordinate soft migrations so improper uses of this function could result in ABI breakage .
pub fn encode_with_context<T: Encodable + ?Sized>(
        context: &Context,
        buf: &'a mut Vec<u8>,
        handles: &'a mut Vec<Handle>,
        x: &mut T,
    ) -> Result<()> {
        fn prepare_for_encoding<'a>(
            context: &'a Context,
            buf: &'a mut Vec<u8>,
            handles: &'a mut Vec<Handle>,
            ty_inline_size: usize,
        ) -> Encoder<'a> {
            let inline_size = round_up_to_align(ty_inline_size, 8);
            buf.truncate(0);
            buf.resize(inline_size, 0);
            handles.truncate(0);
            Encoder { offset: 0, remaining_depth: MAX_RECURSION, buf, handles, context }
        }
        let mut encoder = prepare_for_encoding(context, buf, handles, x.inline_size(context));
        x.encode(&mut encoder)
    }
pub fn encode_with_context < T : Encodable + ? Sized > ( context : & Context , buf : & ' a mut Vec < u8 > , handles : & ' a mut Vec < Handle > , x : & mut T , ) -> Result < ( ) > { fn prepare_for_encoding < ' a > ( context : & ' a Context , buf : & ' a mut Vec < u8 > , handles : & ' a mut Vec < Handle > , ty_inline_size : usize , ) -> Encoder < ' a > { let inline_size = round_up_to_align ( ty_inline_size , 8 ) ; buf . truncate ( 0 ) ; buf . resize ( inline_size , 0 ) ; handles . truncate ( 0 ) ; Encoder { offset : 0 , remaining_depth : MAX_RECURSION , buf , handles , context } } let mut encoder = prepare_for_encoding ( context , buf , handles , x . inline_size ( context ) ) ; x . encode ( & mut encoder ) }
FIDL2-encodes `x` into the provided data and handle buffers, using the
specified encoding context.
FIDL2 - encodes ` x ` into the provided data and handle buffers using the specified encoding context .
context
&Context
buf
&'a mut Vec<u8>
handles
&'a mut Vec<Handle>
x
&mut T
context
&Context
buf
&'a mut Vec<u8>
handles
&'a mut Vec<Handle>
x
&mut T