pub trait AraSerialize: Send + Sync {
// Required methods
fn ara_serialize(&self, buf: &mut Vec<u8>) -> Result<(), AraComError>;
fn serialized_size(&self) -> usize;
}Expand description
Serialization trait for AUTOSAR-compatible wire format encoding.
All primitive types, String, and Vec<T> implement this trait using
big-endian byte order and SOME/IP length-prefix conventions.
Generated struct types receive an implementation from cargo-arxml.
Required Methods§
Sourcefn ara_serialize(&self, buf: &mut Vec<u8>) -> Result<(), AraComError>
fn ara_serialize(&self, buf: &mut Vec<u8>) -> Result<(), AraComError>
Append the wire-format bytes of self to buf.
Sourcefn serialized_size(&self) -> usize
fn serialized_size(&self) -> usize
Return the exact number of bytes that ara_serialize
will append.