[][src]Trait async_coap::InboundContext

pub trait InboundContext: Send {
    type SocketAddr: SocketAddrExt;
    fn remote_socket_addr(&self) -> Self::SocketAddr;
fn is_dupe(&self) -> bool;
fn message(&self) -> &dyn MessageRead; }

Represents the context for processing an inbound message.

Associated Types

type SocketAddr: SocketAddrExt

The SocketAddr type from the associated LocalEndpoint.

Loading content...

Required methods

fn remote_socket_addr(&self) -> Self::SocketAddr

Returns a copy of the remote address of the inbound message.

fn is_dupe(&self) -> bool

Indicates if the endpoint thinks this message is a duplicate. This is used for non-idempotent methods (like POST) to determine if the operation should have real effects or if it should just go through the motions without changing state. Duplicates are generally only passed through when the underlying transport doesn't support support storing sent replies for this purpose.

fn message(&self) -> &dyn MessageRead

Returns a reference to a MessageRead trait to inspect the content of the inbound message.

Loading content...

Implementors

impl InboundContext for NullInboundContext[src]

impl InboundContext for NullRespondableInboundContext[src]

impl<SA: SocketAddrExt> InboundContext for DatagramRespondableInboundContext<SA>[src]

type SocketAddr = SA

Loading content...