pub trait Response<const N: usize>: Sized {
type Payload: Sized;
// Required methods
fn new(
priority: Priority,
service: ServiceId,
destination: NodeId,
source: NodeId,
payload: [u8; N]
) -> CyphalResult<Self>;
fn priority(&self) -> Priority;
fn service(&self) -> ServiceId;
fn destination(&self) -> NodeId;
fn source(&self) -> NodeId;
fn payload(&self) -> &[u8];
}Expand description
Represents a response returned by a service
Required Associated Types§
Required Methods§
sourcefn new(
priority: Priority,
service: ServiceId,
destination: NodeId,
source: NodeId,
payload: [u8; N]
) -> CyphalResult<Self>
fn new( priority: Priority, service: ServiceId, destination: NodeId, source: NodeId, payload: [u8; N] ) -> CyphalResult<Self>
Constructs a new response
sourcefn destination(&self) -> NodeId
fn destination(&self) -> NodeId
Returns the destination Node ID where the response originates
Object Safety§
This trait is not object safe.