Struct nats::ServerAddress
source · pub struct ServerAddress(/* private fields */);
Expand description
Address of a NATS server.
Implementations§
source§impl ServerAddress
impl ServerAddress
sourcepub fn into_inner(self) -> Url
pub fn into_inner(self) -> Url
Turn the server address into a standard URL.
sourcepub fn tls_required(&self) -> bool
pub fn tls_required(&self) -> bool
Returns if tls is required by the client for this server.
sourcepub fn has_user_pass(&self) -> bool
pub fn has_user_pass(&self) -> bool
Returns if the server url had embedded username and password.
sourcepub fn socket_addrs(&self) -> Result<impl Iterator<Item = SocketAddr>>
pub fn socket_addrs(&self) -> Result<impl Iterator<Item = SocketAddr>>
Return the sockets from resolving the server address.
§Fault injection
If compiled with the "fault_injection"
feature this method might fail artificially.
Trait Implementations§
source§impl Clone for ServerAddress
impl Clone for ServerAddress
source§fn clone(&self) -> ServerAddress
fn clone(&self) -> ServerAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ServerAddress
impl Debug for ServerAddress
source§impl FromStr for ServerAddress
impl FromStr for ServerAddress
source§impl Hash for ServerAddress
impl Hash for ServerAddress
source§impl IntoServerList for ServerAddress
impl IntoServerList for ServerAddress
source§fn into_server_list(self) -> Result<Vec<ServerAddress>>
fn into_server_list(self) -> Result<Vec<ServerAddress>>
Convert the instance into a list of
ServerAddress
es.source§impl PartialEq for ServerAddress
impl PartialEq for ServerAddress
source§fn eq(&self, other: &ServerAddress) -> bool
fn eq(&self, other: &ServerAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ServerAddress
impl StructuralPartialEq for ServerAddress
Auto Trait Implementations§
impl Freeze for ServerAddress
impl RefUnwindSafe for ServerAddress
impl Send for ServerAddress
impl Sync for ServerAddress
impl Unpin for ServerAddress
impl UnwindSafe for ServerAddress
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