pub trait OptionalLengthField {
// Required method
fn try_get_length(
reader: &mut ByteReader<'_>,
) -> Result<Option<usize>, ParseError>;
}
Expand description
An optional SOME/IP length field. Can be either u8
, u16
, u32
, or NoLengthField
.
Required Methods§
Sourcefn try_get_length(
reader: &mut ByteReader<'_>,
) -> Result<Option<usize>, ParseError>
fn try_get_length( reader: &mut ByteReader<'_>, ) -> Result<Option<usize>, ParseError>
Parses the optional length field and returns an option containing the length as a usize
.
Noop for NoLengthField
.
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.