Trait cyphal::Message

source ·
pub trait Message<const N: usize>: Sized {
    type Payload: Sized;

    // Required methods
    fn priority(&self) -> Priority;
    fn source(&self) -> Option<NodeId>;
    fn subject(&self) -> SubjectId;
    fn payload(&self) -> &[u8];
}
Expand description

Trait representing a message

Required Associated Types§

source

type Payload: Sized

Type representing the payload of the message

Required Methods§

source

fn priority(&self) -> Priority

The Priority of the message

source

fn source(&self) -> Option<NodeId>

Returns the Node ID of the sender. Anonymous messages can be sent using None

source

fn subject(&self) -> SubjectId

Returns the Subject ID of the message

source

fn payload(&self) -> &[u8]

Return the message payload

Object Safety§

This trait is not object safe.

Implementors§