Struct nats::ServerAddress
source · pub struct ServerAddress(_);
Expand description
Address of a NATS server.
Implementations
sourceimpl 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
sourceimpl Clone for ServerAddress
impl Clone for ServerAddress
sourcefn clone(&self) -> ServerAddress
fn clone(&self) -> ServerAddress
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for ServerAddress
impl Debug for ServerAddress
sourceimpl FromStr for ServerAddress
impl FromStr for ServerAddress
sourceimpl Hash for ServerAddress
impl Hash for ServerAddress
sourceimpl IntoServerList for ServerAddress
impl IntoServerList for ServerAddress
sourcefn into_server_list(self) -> Result<Vec<ServerAddress>>
fn into_server_list(self) -> Result<Vec<ServerAddress>>
Convert the instance into a list of
ServerAddress
es.sourceimpl PartialEq<ServerAddress> for ServerAddress
impl PartialEq<ServerAddress> for ServerAddress
sourcefn eq(&self, other: &ServerAddress) -> bool
fn eq(&self, other: &ServerAddress) -> bool
impl Eq for ServerAddress
impl StructuralEq for ServerAddress
impl StructuralPartialEq for ServerAddress
Auto Trait Implementations
impl RefUnwindSafe for ServerAddress
impl Send for ServerAddress
impl Sync for ServerAddress
impl Unpin for ServerAddress
impl UnwindSafe for ServerAddress
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more