pub struct AddressEndpoint { /* private fields */ }Expand description
A TCP endpoint at one numeric IPv4 or IPv6 address. Construction performs no I/O, and operations require no resolver capability.
Implementations§
Source§impl AddressEndpoint
impl AddressEndpoint
Sourcepub const fn new(address: SocketAddress) -> Self
pub const fn new(address: SocketAddress) -> Self
Describe a TCP endpoint. Port zero requests an OS-selected port when binding.
Sourcepub const fn address(&self) -> SocketAddress
pub const fn address(&self) -> SocketAddress
The configured address. A bound ephemeral port is obtained from the returned listener through the scheduler.
Trait Implementations§
Source§impl<S> BindEndpoint<S> for AddressEndpoint
impl<S> BindEndpoint<S> for AddressEndpoint
Source§type Listener = <S as SocketOperation>::Socket
type Listener = <S as SocketOperation>::Socket
One bound listener, owned by the caller on success. Its representation belongs to the endpoint implementation.
Source§async fn bind(
&self,
scheduler: &S,
options: BindOptions,
cancellation: &Cancellation,
) -> OperationResult<Vec<S::Socket>>
async fn bind( &self, scheduler: &S, options: BindOptions, cancellation: &Cancellation, ) -> OperationResult<Vec<S::Socket>>
Bind and start listening on every address. Success returns a nonempty collection; failure transfers no listeners to the caller. Futures are lazy. Await completion after cooperative cancellation to finish asynchronous rollback; dropping a pending future provides ordinary destruction only.
Source§impl Clone for AddressEndpoint
impl Clone for AddressEndpoint
Source§impl<S> ConnectEndpoint<S> for AddressEndpoint
impl<S> ConnectEndpoint<S> for AddressEndpoint
Source§type Connection = <S as SocketOperation>::Socket
type Connection = <S as SocketOperation>::Socket
The established transport, owned by the caller on success.
Source§async fn connect(
&self,
scheduler: &S,
cancellation: &Cancellation,
) -> OperationResult<S::Socket>
async fn connect( &self, scheduler: &S, cancellation: &Cancellation, ) -> OperationResult<S::Socket>
Establish one connection. Futures are lazy. Await completion after requesting cooperative cancellation so implementation-owned asynchronous cleanup can finish. Dropping a future abandons it and provides ordinary resource destruction, not an asynchronous cleanup guarantee.
impl Copy for AddressEndpoint
Source§impl Debug for AddressEndpoint
impl Debug for AddressEndpoint
Source§impl Display for AddressEndpoint
impl Display for AddressEndpoint
impl Eq for AddressEndpoint
Source§impl PartialEq for AddressEndpoint
impl PartialEq for AddressEndpoint
impl StructuralPartialEq for AddressEndpoint
Auto Trait Implementations§
impl Freeze for AddressEndpoint
impl RefUnwindSafe for AddressEndpoint
impl Send for AddressEndpoint
impl Sync for AddressEndpoint
impl Unpin for AddressEndpoint
impl UnsafeUnpin for AddressEndpoint
impl UnwindSafe for AddressEndpoint
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