[−][src]Trait async_coap::RespondableInboundContext
Represents the context for processing an inbound request that can be responded to.
Required methods
fn is_multicast(&self) -> bool
Indicates if the inbound request was a multicast request or not. Multicast requests have additional response timing requirements in order to avoid congestion.
fn is_fake(&self) -> bool
Indicates if this inbound request is from a real inbound request or if it
is a fake request that is being generated internally to solicit a response.
Fake requests are only generated for the GET
method.
fn respond<F>(&self, msg_gen: F) -> Result<(), Error> where
F: Fn(&mut dyn MessageWrite) -> Result<(), Error>,
F: Fn(&mut dyn MessageWrite) -> Result<(), Error>,
Responds to this inbound request using a message generated from msg_gen
.
The msg_id
and msg_token
fields will be automatically populated.
This method will return the value returned by msg_gen
.
Implementors
impl RespondableInboundContext for NullRespondableInboundContext
[src]
fn is_multicast(&self) -> bool
[src]
fn is_fake(&self) -> bool
[src]
fn respond<F>(&self, _msg_gen: F) -> Result<(), Error> where
F: Fn(&mut dyn MessageWrite) -> Result<(), Error>,
[src]
F: Fn(&mut dyn MessageWrite) -> Result<(), Error>,