SerializeExt

Trait SerializeExt 

pub trait SerializeExt: Sized {
    // Required method
    fn serialize<'a>(
        &self,
        buffer: &'a mut [u8],
    ) -> Result<&'a [u8], SerializeError>;
}
Available on crate feature data-support-someip only.
Expand description

An extension trait to expose a nicer API to the user.

Required Methods§

fn serialize<'a>( &self, buffer: &'a mut [u8], ) -> Result<&'a [u8], SerializeError>

Serializes a SOME/IP payload type to a given slice of bytes using Serialize and returns the number of bytes written to the buffer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<T> SerializeExt for T
where T: Serialize,