Struct someip_messages::Header
source · pub struct Header {
pub message_id: MessageId,
pub length: u32,
pub request_id: RequestId,
pub protocol_version: ProtocolVersion,
pub interface_version: InterfaceVersion,
pub message_type: MessageType,
pub return_code: ReturnCode,
}
Expand description
Represents the header of a SOME/IP message.
Fields§
§message_id: MessageId
Message id
length: u32
Message length
request_id: RequestId
Request id
protocol_version: ProtocolVersion
Protocol version
interface_version: InterfaceVersion
Interface version
message_type: MessageType
Message type
return_code: ReturnCode
Return code
Implementations§
source§impl Header
impl Header
sourcepub fn new(
message_id: MessageId,
length: u32,
request_id: RequestId,
protocol_version: ProtocolVersion,
interface_version: InterfaceVersion,
message_type: MessageType,
return_code: ReturnCode
) -> Self
pub fn new( message_id: MessageId, length: u32, request_id: RequestId, protocol_version: ProtocolVersion, interface_version: InterfaceVersion, message_type: MessageType, return_code: ReturnCode ) -> Self
Creates a new header with the given message id, length, request id, protocol version, interface version, message type and return code.
sourcepub fn message_id(&self) -> &MessageId
pub fn message_id(&self) -> &MessageId
Get message id
sourcepub fn message_len(&self) -> usize
pub fn message_len(&self) -> usize
The length of the message associated with the header
sourcepub fn payload_len(&self) -> usize
pub fn payload_len(&self) -> usize
The length of the payload associated with the header
sourcepub fn request_id(&self) -> &RequestId
pub fn request_id(&self) -> &RequestId
Get request id
sourcepub fn session_id(&self) -> SessionId
pub fn session_id(&self) -> SessionId
Get session id
sourcepub fn protocol_version(&self) -> ProtocolVersion
pub fn protocol_version(&self) -> ProtocolVersion
Get protocol version
sourcepub fn interface_version(&self) -> InterfaceVersion
pub fn interface_version(&self) -> InterfaceVersion
Get interface version
sourcepub fn message_type(&self) -> MessageType
pub fn message_type(&self) -> MessageType
Get message type
sourcepub fn return_code(&self) -> ReturnCode
pub fn return_code(&self) -> ReturnCode
Get return code
Trait Implementations§
source§impl PartialEq<Header> for Header
impl PartialEq<Header> for Header
impl Eq for Header
impl StructuralEq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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