Struct IncludeSocketAddr

Source
pub struct IncludeSocketAddr<SD> { /* private fields */ }
Expand description

Combinator for Send Descriptors created by SendDescExt::include_socket_addr.

Trait Implementations§

Source§

impl<SD: Debug> Debug for IncludeSocketAddr<SD>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<SD, IC, R> SendDesc<IC, (R, <IC as InboundContext>::SocketAddr)> for IncludeSocketAddr<SD>
where SD: SendDesc<IC, R> + Send, IC: InboundContext, R: Send,

Source§

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>

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

The maximum time to wait for an asynchronous response after having received an ACK.
Source§

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>

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>

Generates the outbound message by making calls into msg.
Source§

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, IC::SocketAddr)>, Error>

Handles the response to the outbound message.
Source§

fn trans_params(&self) -> Option<TP>

Experimental: Gets custom transmission parameters.
Source§

impl<SD: SendDescUnicast> SendDescUnicast for IncludeSocketAddr<SD>

Source§

fn block2<IC, R, TP>(self, block2: Option<BlockInfo>) -> UnicastBlock2<Self, IC>
where IC: InboundContext, R: Send, TP: TransParams, Self: SendDesc<IC, R, TP> + Sized,

Returns a send descriptor that will perform Block2 processing. Read more
Source§

impl<SD: SendDescMulticast> SendDescMulticast for IncludeSocketAddr<SD>

Auto Trait Implementations§

§

impl<SD> Freeze for IncludeSocketAddr<SD>
where SD: Freeze,

§

impl<SD> RefUnwindSafe for IncludeSocketAddr<SD>
where SD: RefUnwindSafe,

§

impl<SD> Send for IncludeSocketAddr<SD>
where SD: Send,

§

impl<SD> Sync for IncludeSocketAddr<SD>
where SD: Sync,

§

impl<SD> Unpin for IncludeSocketAddr<SD>
where SD: Unpin,

§

impl<SD> UnwindSafe for IncludeSocketAddr<SD>
where SD: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, IC, R, TP> SendDescExt<IC, R, TP> for T
where T: SendDesc<IC, R, TP>, IC: InboundContext, R: Send, TP: TransParams,

Source§

fn add_option_iter<K, I>( self, key: OptionKey<K>, viter: I, ) -> AddOption<Self, K, I, IC>
where I: IntoIterator<Item = K> + Send + Clone, K: Send + Clone,

Adds zero or more instances of the option key, using values coming from viter. Read more
Source§

fn add_option<K>( self, key: OptionKey<K>, value: K, ) -> AddOption<Self, K, Once<K>, IC>
where K: Send + Clone,

Adds one instance of the option key with a value of value.
Source§

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>

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,

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>

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>

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>

Updates the send descriptor chain to emit only the message code of the received response.
Source§

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>
where F: FnMut(&dyn InboundContext<SocketAddr = IC::SocketAddr>) + Send,

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>
where F: Fn(&mut dyn MessageWrite) -> Result<(), Error> + Send,

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>

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.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V