pub struct ClientName<'a> {
pub role: &'a str,
pub identity: Option<&'a str>,
}Expand description
A connection name split back into its parts — see client_name.
Fields§
§role: &'a strThe role segment as announced. A &str rather than a NatsRole
on purpose: a connection from a future (or foreign) build may name a
role this binary does not know, and dropping it on the floor would
hide exactly the host worth looking at.
identity: Option<&'a str>The host identity, when the connection carried one. None for the
backend / CLI (which are not per-host) and for agents predating
#1270 — those simply cannot be attributed.
Trait Implementations§
Source§impl<'a> Clone for ClientName<'a>
impl<'a> Clone for ClientName<'a>
Source§fn clone(&self) -> ClientName<'a>
fn clone(&self) -> ClientName<'a>
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 moreimpl<'a> Copy for ClientName<'a>
Source§impl<'a> Debug for ClientName<'a>
impl<'a> Debug for ClientName<'a>
impl<'a> Eq for ClientName<'a>
Source§impl<'a> PartialEq for ClientName<'a>
impl<'a> PartialEq for ClientName<'a>
impl<'a> StructuralPartialEq for ClientName<'a>
Auto Trait Implementations§
impl<'a> Freeze for ClientName<'a>
impl<'a> RefUnwindSafe for ClientName<'a>
impl<'a> Send for ClientName<'a>
impl<'a> Sync for ClientName<'a>
impl<'a> Unpin for ClientName<'a>
impl<'a> UnsafeUnpin for ClientName<'a>
impl<'a> UnwindSafe for ClientName<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.