pub struct Repr<'a> {
pub flags: u8,
pub reserved: u32,
pub entries: &'a [u8],
pub options: &'a [u8],
}Expand description
A high-level representation of a SOME/IP-SD message.
§Creating a Repr
The preferred way to create a Repr is using Repr::new(), which automatically
calculates the correct length fields. However, you can also construct it manually
using struct initialization if needed.
Fields§
§flags: u8Flags (1 byte) - typically used for reboot/unicast flags
reserved: u32Reserved field (3 bytes) - should be 0x000000
entries: &'a [u8]Entries array (variable length)
options: &'a [u8]Options array (variable length)
Implementations§
Source§impl<'a> Repr<'a>
impl<'a> Repr<'a>
Sourcepub fn emit<T>(&self, packet: &mut Packet<&mut T>)
pub fn emit<T>(&self, packet: &mut Packet<&mut T>)
Emits the high-level representation of the SOME/IP-SD packet into the provided packet/buffer.
§Arguments
packet- A mutable reference to the packet where the high-level representation will be written.
Sourcepub fn buffer_len(&self) -> usize
pub fn buffer_len(&self) -> usize
Get the total wire format size needed for this representation
§Returns
usize- The total size in bytes
Trait Implementations§
impl<'a> Copy for Repr<'a>
impl<'a> Eq for Repr<'a>
impl<'a> StructuralPartialEq for Repr<'a>
Auto Trait Implementations§
impl<'a> Freeze for Repr<'a>
impl<'a> RefUnwindSafe for Repr<'a>
impl<'a> Send for Repr<'a>
impl<'a> Sync for Repr<'a>
impl<'a> Unpin for Repr<'a>
impl<'a> UnwindSafe for Repr<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more