pub struct EndpointList { /* private fields */ }Expand description
List of IP endpoints
You can write IP addresses or DNS names and the port to connect to. e.g. "127.0.0.1:20000" or "dnp3.myorg.com:20000".
The main endpoint is always favoured. When a successful connection is established, it resets the next endpoint to try, meaning if the connection is lost, the main endpoint will be retried first, then the other endpoints in the order they were defined.
Implementations§
Source§impl EndpointList
impl EndpointList
Sourcepub fn new(addr: String, fail_overs_list: &[String]) -> Self
pub fn new(addr: String, fail_overs_list: &[String]) -> Self
Create a list with a main endpoint followed by fail-overs
Sourcepub fn into_connect_handler(
self,
strategy: ConnectStrategy,
) -> Box<dyn ClientConnectionHandler>
pub fn into_connect_handler( self, strategy: ConnectStrategy, ) -> Box<dyn ClientConnectionHandler>
Create a ClientConnectionHandler from this endpoint list with the
given ConnectStrategy and default ConnectOptions.
Sourcepub fn into_connect_handler_with_options(
self,
strategy: ConnectStrategy,
options: ConnectOptions,
) -> Box<dyn ClientConnectionHandler>
pub fn into_connect_handler_with_options( self, strategy: ConnectStrategy, options: ConnectOptions, ) -> Box<dyn ClientConnectionHandler>
Create a ClientConnectionHandler from this endpoint list with the
given ConnectStrategy and ConnectOptions.
Trait Implementations§
Source§impl Clone for EndpointList
impl Clone for EndpointList
Source§fn clone(&self) -> EndpointList
fn clone(&self) -> EndpointList
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EndpointList
impl RefUnwindSafe for EndpointList
impl Send for EndpointList
impl Sync for EndpointList
impl Unpin for EndpointList
impl UnsafeUnpin for EndpointList
impl UnwindSafe for EndpointList
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