Skip to main content

SocketAddressView

Trait SocketAddressView 

Source
pub trait SocketAddressView: Send + Sync {
    // Required method
    fn to_socket_address(&self) -> SocketAddress;
}
Expand description

An IP endpoint exposed by an address representation chosen by its provider. A view can borrow native metadata or refer to an already materialized portable address. The contract specifies the endpoint, without prescribing storage, copying, or allocation costs.

Required Methods§

Source

fn to_socket_address(&self) -> SocketAddress

Materialize the portable endpoint, preserving IPv6 flow information and scope identifiers.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T: SocketAddressView + ?Sized> SocketAddressView for &T

Implementors§