pub fn encode_persistent_body<T: Encodable>(
    body: &mut T,
    header: &PersistentHeader,
) -> Result<Vec<u8>> {
    let mut combined_bytes = Vec::<u8>::new();
    let mut handles = Vec::<HandleDisposition<'static>>::new();
    Encoder::encode_with_context(
        &header.decoding_context(),
        &mut combined_bytes,
        &mut handles,
        body,
    )?;
    debug_assert!(handles.is_empty(), "Persistent message contains handles");
    Ok(combined_bytes)
}
/// Encode the message body to to persistent binary form.
Encode the message body to to persistent binary form.
Encode the message body to to persistent binary form .
pub fn encode_persistent_body<T: Encodable>(
    body: &mut T,
    header: &PersistentHeader,
) -> Result<Vec<u8>> {
    let mut combined_bytes = Vec::<u8>::new();
    let mut handles = Vec::<HandleDisposition<'static>>::new();
    Encoder::encode_with_context(
        &header.decoding_context(),
        &mut combined_bytes,
        &mut handles,
        body,
    )?;
    debug_assert!(handles.is_empty(), "Persistent message contains handles");
    Ok(combined_bytes)
}
pub fn encode_persistent_body < T : Encodable > ( body : & mut T , header : & PersistentHeader , ) -> Result < Vec < u8 > > { let mut combined_bytes = Vec :: < u8 > :: new ( ) ; let mut handles = Vec :: < HandleDisposition < ' static > > :: new ( ) ; Encoder :: encode_with_context ( & header . decoding_context ( ) , & mut combined_bytes , & mut handles , body , ) ? ; debug_assert ! ( handles is_empty ( ) " " ) ; Ok ( combined_bytes ) }
Encode the message body to to persistent binary form.
Encode the message body to to persistent binary form .
body
&mut T
header
&PersistentHeader
body
&mut T
header
&PersistentHeader