/// Encode this struct into it's [persistent message encoding].
///
/// [persistent message encoding]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0120_standalone_use_of_fidl_wire_format
Encode this struct into it's [persistent message encoding].
Encode this struct into it ' s [ persistent message encoding ] .
pub fn encode_persistent(&self) -> Vec<u8> {
        let mut buf = Vec::new();
        // encode the persistent header:
        buf.push(0); // disambiguator
        buf.push(1); // current wire format magic number
        buf.extend(2u16.to_le_bytes()); // v2 wire format
        buf.extend([0; 4]); // reserved with zeroes
        // encode the body of the message
        self.encode(&mut buf);
        buf
    }
pub fn encode_persistent ( & self ) -> Vec < u8 > { let mut buf = Vec :: new ( ) ; // encode the persistent header: buf . push ( 0 ) ; // disambiguator buf . push ( 1 ) ; // current wire format magic number buf . extend ( 2u16 . to_le_bytes ( ) ) ; // v2 wire format buf . extend ( [ 0 ; 4 ] ) ; // reserved with zeroes // encode the body of the message self . encode ( & mut buf ) ; buf }
Encode this struct into it's [persistent message encoding].
Encode this struct into it ' s [ persistent message encoding ] .
&self