pub struct Inspect<SD, F> { /* private fields */ }
Expand description
Combinator for Send Descriptors created by SendDescExt::inspect
.
Trait Implementations§
Source§impl<SD, F, IC, R> SendDesc<IC, R> for Inspect<SD, F>where
SD: SendDesc<IC, R> + Send,
IC: InboundContext,
R: Send,
F: FnMut(&dyn InboundContext<SocketAddr = IC::SocketAddr>) + Send,
impl<SD, F, IC, R> SendDesc<IC, R> for Inspect<SD, F>where
SD: SendDesc<IC, R> + Send,
IC: InboundContext,
R: Send,
F: FnMut(&dyn InboundContext<SocketAddr = IC::SocketAddr>) + Send,
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_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 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 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 handler(
&mut self,
context: Result<&IC, Error>,
) -> Result<ResponseStatus<R>, Error>
fn handler( &mut self, context: Result<&IC, Error>, ) -> Result<ResponseStatus<R>, 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.
Source§impl<SD: SendDescUnicast, IC> SendDescUnicast for Inspect<SD, IC>
impl<SD: SendDescUnicast, IC> SendDescUnicast for Inspect<SD, IC>
impl<SD: SendDescMulticast, IC> SendDescMulticast for Inspect<SD, IC>
Auto Trait Implementations§
impl<SD, F> Freeze for Inspect<SD, F>
impl<SD, F> RefUnwindSafe for Inspect<SD, F>where
SD: RefUnwindSafe,
F: RefUnwindSafe,
impl<SD, F> Send for Inspect<SD, F>
impl<SD, F> Sync for Inspect<SD, F>
impl<SD, F> Unpin for Inspect<SD, F>
impl<SD, F> UnwindSafe for Inspect<SD, F>where
SD: UnwindSafe,
F: 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.