pub struct Multicast<SD>(/* private fields */);Expand description
Multicast send descriptor combinator created by the multicast() method on
SendGet, SendPut, SendPost, SendDelete, and SendObserve.
This send descriptor can yield multiple results, so it should be used with
LocalEndpointExt::send_as_stream, RemoteEndpointExt::send_as_stream,
and/or RemoteEndpointExt::send_to_as_stream.
Trait Implementations§
Source§impl<SD, IC> SendDesc<IC> for Multicast<SD>
impl<SD, IC> SendDesc<IC> for Multicast<SD>
Source§fn write_options(
&self,
msg: &mut dyn OptionInsert,
socket_addr: &IC::SocketAddr,
start: Bound<OptionNumber>,
end: Bound<OptionNumber>,
) -> Result<(), Error>
fn write_options( &self, msg: &mut dyn OptionInsert, socket_addr: &IC::SocketAddr, start: Bound<OptionNumber>, end: Bound<OptionNumber>, ) -> Result<(), Error>
Defines which options are going to be included in the outbound message. Read more
Source§fn supports_option(&self, option: OptionNumber) -> bool
fn supports_option(&self, option: OptionNumber) -> bool
Experimental: Used for determining if the given option seen in the reply message
is supported or not. Read more
Source§fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
fn delay_to_retransmit(&self, retransmits_sent: u32) -> Option<Duration>
Calculates the duration of the delay to wait before sending the next retransmission. Read more
Source§fn delay_to_restart(&self) -> Option<Duration>
fn delay_to_restart(&self) -> Option<Duration>
The delay to wait between when we have received a successful response and when
we should send out another request. Read more
Source§fn max_rtt(&self) -> Duration
fn max_rtt(&self) -> Duration
The maximum time to wait for an asynchronous response after having received an ACK.
Source§fn transmit_wait_duration(&self) -> Duration
fn transmit_wait_duration(&self) -> Duration
the maximum time from the first transmission of a Confirmable message to the time when
the sender gives up on receiving an acknowledgement or reset.
Source§fn write_payload(
&self,
msg: &mut dyn MessageWrite,
socket_addr: &IC::SocketAddr,
) -> Result<(), Error>
fn write_payload( &self, msg: &mut dyn MessageWrite, socket_addr: &IC::SocketAddr, ) -> Result<(), Error>
Generates the outbound message by making calls into
msg.Source§fn handler(
&mut self,
context: Result<&IC, Error>,
) -> Result<ResponseStatus<()>, Error>
fn handler( &mut self, context: Result<&IC, Error>, ) -> Result<ResponseStatus<()>, Error>
Handles the response to the outbound message.
Source§fn trans_params(&self) -> Option<TP>
fn trans_params(&self) -> Option<TP>
Experimental: Gets custom transmission parameters.
impl<SD> SendDescMulticast for Multicast<SD>
Auto Trait Implementations§
impl<SD> Freeze for Multicast<SD>where
SD: Freeze,
impl<SD> RefUnwindSafe for Multicast<SD>where
SD: RefUnwindSafe,
impl<SD> Send for Multicast<SD>where
SD: Send,
impl<SD> Sync for Multicast<SD>where
SD: Sync,
impl<SD> Unpin for Multicast<SD>where
SD: Unpin,
impl<SD> UnwindSafe for Multicast<SD>where
SD: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, IC, R, TP> SendDescExt<IC, R, TP> for T
impl<T, IC, R, TP> SendDescExt<IC, R, TP> for T
Source§fn add_option_iter<K, I>(
self,
key: OptionKey<K>,
viter: I,
) -> AddOption<Self, K, I, IC>
fn add_option_iter<K, I>( self, key: OptionKey<K>, viter: I, ) -> AddOption<Self, K, I, IC>
Source§fn add_option<K>(
self,
key: OptionKey<K>,
value: K,
) -> AddOption<Self, K, Once<K>, IC>
fn add_option<K>( self, key: OptionKey<K>, value: K, ) -> AddOption<Self, K, Once<K>, IC>
Adds one instance of the option
key with a value of value.Source§fn accept(
self,
accept: ContentFormat,
) -> AddOption<Self, ContentFormat, Once<ContentFormat>, IC>
fn accept( self, accept: ContentFormat, ) -> AddOption<Self, ContentFormat, Once<ContentFormat>, IC>
Adds an Accept option with the given
ContentFormat.Source§fn content_format(
self,
content_format: ContentFormat,
) -> AddOption<Self, ContentFormat, Once<ContentFormat>, IC>
fn content_format( self, content_format: ContentFormat, ) -> AddOption<Self, ContentFormat, Once<ContentFormat>, IC>
Adds an Content-Format option with the given
ContentFormat.Source§fn use_handler<F, FR>(self, handler: F) -> Handler<Self, F>where
F: FnMut(Result<&dyn InboundContext<SocketAddr = IC::SocketAddr>, Error>) -> Result<ResponseStatus<FR>, Error> + Send,
FR: Send,
fn use_handler<F, FR>(self, handler: F) -> Handler<Self, F>where
F: FnMut(Result<&dyn InboundContext<SocketAddr = IC::SocketAddr>, Error>) -> Result<ResponseStatus<FR>, Error> + Send,
FR: Send,
Adds a handler function to be called when a response message has been received (or when
an error has occurred).
Source§fn emit_any_response(self) -> EmitAnyResponse<Self>
fn emit_any_response(self) -> EmitAnyResponse<Self>
Updates the send descriptor chain to emit any received message as a result, even
if that message has a message code that indicates an error.
Source§fn emit_successful_response(self) -> EmitSuccessfulResponse<Self>
fn emit_successful_response(self) -> EmitSuccessfulResponse<Self>
Updates the send descriptor chain to emit received message as a result, but only
if that message has a message code that indicates success.
Source§fn emit_msg_code(self) -> EmitMsgCode<Self>
fn emit_msg_code(self) -> EmitMsgCode<Self>
Updates the send descriptor chain to emit only the message code of the received
response.
Source§fn include_socket_addr(self) -> IncludeSocketAddr<Self>
fn include_socket_addr(self) -> IncludeSocketAddr<Self>
Updates the send descriptor chain to also emit the SocketAddr of the sender
of the response, resulting in tuple return type. Read more
Source§fn inspect<F>(self, inspect: F) -> Inspect<Self, F>
fn inspect<F>(self, inspect: F) -> Inspect<Self, F>
Adds an inspection closure that will be called for each received response message. Read more
Source§fn payload_writer<F>(self, writer: F) -> PayloadWriter<Self, F>
fn payload_writer<F>(self, writer: F) -> PayloadWriter<Self, F>
Adds a closure that writes to the payload of the outbound message.
Source§fn uri_host_path<T: Into<RelRefBuf>>(
self,
host: Option<String>,
uri_path: T,
) -> UriHostPath<Self, IC>
fn uri_host_path<T: Into<RelRefBuf>>( self, host: Option<String>, uri_path: T, ) -> UriHostPath<Self, IC>
Allows you to specify the URI_HOST, URI_PATH, and URI_QUERY option values
in a more convenient way than using
add_option_iter manually.