Struct aggligator_util::transport::Connector
source · pub struct Connector { /* private fields */ }Expand description
Connects to remote endpoint using a variety of transports.
Dropping this does not terminate the connection or the transport connection task.
Implementations§
source§impl Connector
impl Connector
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new connector using the default configuration.
Use ConnectorBuilder for customization.
sourcepub fn wrapped(wrapper: impl ConnectingWrapper) -> Self
pub fn wrapped(wrapper: impl ConnectingWrapper) -> Self
Creates a new connector using the default configuration and a single connection wrapper.
sourcepub fn add(
&self,
transport: impl ConnectingTransport
) -> ConnectingTransportHandle
pub fn add(
&self,
transport: impl ConnectingTransport
) -> ConnectingTransportHandle
Adds a transport.
sourcepub fn channel(&mut self) -> Option<Outgoing>
pub fn channel(&mut self) -> Option<Outgoing>
Waits for the connection to be established and obtains the aggregated link channel.
If this has been called before None is returned.
sourcepub fn control(&self) -> Control<IoTxBox, IoRxBox, LinkTagBox>
pub fn control(&self) -> Control<IoTxBox, IoRxBox, LinkTagBox>
Obtains the connection control of the aggregated connection.
Gets the current set of available link tags.
The set of available tags does not necesarilly match the set of connected tags. Use the connection control to obtain and monitor the set of connected tags.
Watches the set of available link tags.
Sets the set of disabled link tags.
sourcepub fn link_errors(&self) -> Receiver<LinkError<LinkTagBox>>
pub fn link_errors(&self) -> Receiver<LinkError<LinkTagBox>>
Subscribes to the stream of link errors.