pub struct Length(/* private fields */);
Expand description
SOME/IP length header field.
Implementations§
Source§impl Length
impl Length
Sourcepub fn from_payload_length(length: u32) -> Length
pub fn from_payload_length(length: u32) -> Length
Calculates the length of the payload, not including any of the header.
This does not take E2E protection into account.
Sourcepub fn payload_length(&self) -> u32
pub fn payload_length(&self) -> u32
Calculates the length of the payload, not including any of the header.
This does not take E2E protection into account.
Trait Implementations§
Source§impl<'a> Parse<'a> for Length
impl<'a> Parse<'a> for Length
Source§fn parse_partial(reader: &mut ByteReader<'a>) -> Result<Length, ParseError>
fn parse_partial(reader: &mut ByteReader<'a>) -> Result<Length, ParseError>
Parses a SOME/IP payload type from a given slice of bytes. Read more
Source§impl<'a> Serialize for Length
impl<'a> Serialize for Length
Source§fn required_length(&self) -> usize
fn required_length(&self) -> usize
Returns the number of bytes required to store the serialized version of self.
Source§fn serialize_partial(
&self,
byte_writer: &mut ByteWriter<'_>,
) -> Result<(), SerializeError>
fn serialize_partial( &self, byte_writer: &mut ByteWriter<'_>, ) -> Result<(), SerializeError>
Serializes to a byte writer.
impl Copy for Length
impl Eq for Length
impl StructuralPartialEq for Length
Auto Trait Implementations§
impl Freeze for Length
impl RefUnwindSafe for Length
impl Send for Length
impl Sync for Length
impl Unpin for Length
impl UnwindSafe for Length
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