Skip to main content

RemoteEndpointExt

Trait RemoteEndpointExt 

Source
pub trait RemoteEndpointExt: RemoteEndpoint {
    // Provided methods
    fn ping(&self) -> BoxFuture<'_, Result<(), Error>> { ... }
    fn send_as_stream<'a, R, SD>(&'a self, send_desc: SD) -> SendAsStream<'a, R>
       where SD: SendDesc<Self::InboundContext, R> + 'a,
             R: Send + 'a { ... }
    fn send_to_as_stream<'a, R, SD, UF>(
        &'a self,
        path: UF,
        send_desc: SD,
    ) -> SendAsStream<'a, R>
       where SD: SendDesc<Self::InboundContext, R> + 'a,
             R: Send + 'a,
             UF: AsRef<RelRef> { ... }
}
Expand description

Extension trait which implements additional helper methods.

Provided Methods§

Source

fn ping(&self) -> BoxFuture<'_, Result<(), Error>>

Sends an application-level ping to to one or more addresses specified by dest. The first response received causes the future to emit Ok(()).

Source

fn send_as_stream<'a, R, SD>(&'a self, send_desc: SD) -> SendAsStream<'a, R>
where SD: SendDesc<Self::InboundContext, R> + 'a, R: Send + 'a,

Analogous to LocalEndpointExt::send_as_stream, except using this RemoteEndpoint for the destination SocketAddr and path.

Source

fn send_to_as_stream<'a, R, SD, UF>( &'a self, path: UF, send_desc: SD, ) -> SendAsStream<'a, R>
where SD: SendDesc<Self::InboundContext, R> + 'a, R: Send + 'a, UF: AsRef<RelRef>,

Analogous to LocalEndpointExt::send_as_stream, except using this RemoteEndpoint for the destination SocketAddr and using a path relative to this RemoteEndpoint.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: RemoteEndpoint> RemoteEndpointExt for T

Blanket implementation of RemoteEndpointExt for all RemoteEndpoint instances.