Trait cyphal::Request

source ·
pub trait Request<const N: usize, const M: usize>: Sized {
    type Payload: Sized;
    type Response: Response<M>;

    // Required methods
    fn priority(&self) -> Priority;
    fn service(&self) -> ServiceId;
    fn destination(&self) -> NodeId;
    fn source(&self) -> NodeId;
    fn payload(&self) -> &[u8];
}
Expand description

Represents a resquest sent to a service

Required Associated Types§

source

type Payload: Sized

Type representing the payload in the request

source

type Response: Response<M>

Type representing the response returned by the service

Required Methods§

source

fn priority(&self) -> Priority

Returns the priority level of the request

source

fn service(&self) -> ServiceId

Returns the Service ID the request is intended for

source

fn destination(&self) -> NodeId

Returns the destination Node ID the request is intended for

source

fn source(&self) -> NodeId

Returns the Node ID where the request originates

source

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

Returns the payload of the request

Object Safety§

This trait is not object safe.

Implementors§