pub struct CompositeEndpoint<E> { /* private fields */ }Expand description
An ordered collection of endpoints of one type. Connecting tries children in order until one succeeds. Binding creates every child’s listeners and rolls them all back if a later child fails. Empty collections fail with AddrNotAvailable.
Implementations§
Trait Implementations§
Source§impl<S, E> BindEndpoint<S> for CompositeEndpoint<E>
impl<S, E> BindEndpoint<S> for CompositeEndpoint<E>
Source§type Listener = <E as BindEndpoint<S>>::Listener
type Listener = <E as BindEndpoint<S>>::Listener
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<Self::Listener>>
async fn bind( &self, scheduler: &S, options: BindOptions, cancellation: &Cancellation, ) -> OperationResult<Vec<Self::Listener>>
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<E: Clone> Clone for CompositeEndpoint<E>
impl<E: Clone> Clone for CompositeEndpoint<E>
Source§impl<S, E> ConnectEndpoint<S> for CompositeEndpoint<E>
impl<S, E> ConnectEndpoint<S> for CompositeEndpoint<E>
Source§type Connection = <E as ConnectEndpoint<S>>::Connection
type Connection = <E as ConnectEndpoint<S>>::Connection
The established transport, owned by the caller on success.
Source§async fn connect(
&self,
scheduler: &S,
cancellation: &Cancellation,
) -> OperationResult<Self::Connection>
async fn connect( &self, scheduler: &S, cancellation: &Cancellation, ) -> OperationResult<Self::Connection>
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.
Source§impl<E: Debug> Debug for CompositeEndpoint<E>
impl<E: Debug> Debug for CompositeEndpoint<E>
impl<E: Eq> Eq for CompositeEndpoint<E>
Source§impl<E: PartialEq> PartialEq for CompositeEndpoint<E>
impl<E: PartialEq> PartialEq for CompositeEndpoint<E>
impl<E: PartialEq> StructuralPartialEq for CompositeEndpoint<E>
Auto Trait Implementations§
impl<E> Freeze for CompositeEndpoint<E>
impl<E> RefUnwindSafe for CompositeEndpoint<E>where
Vec<E>: RefUnwindSafe,
impl<E> Send for CompositeEndpoint<E>
impl<E> Sync for CompositeEndpoint<E>
impl<E> Unpin for CompositeEndpoint<E>
impl<E> UnsafeUnpin for CompositeEndpoint<E>where
Vec<E>: UnsafeUnpin,
impl<E> UnwindSafe for CompositeEndpoint<E>where
Vec<E>: 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