pub struct DiscoverKey {
pub name: FastStr,
pub port: u16,
}Available on crate feature
client only.Expand description
Key used to cache for Discover.
Fields§
§name: FastStrService name for Service Discover, it’s domain name for DNS by default.
port: u16Port for the service name, it’s unnecessary for Service Discover, but it’s important to cache as key.
Implementations§
Source§impl DiscoverKey
impl DiscoverKey
Sourcepub fn from_endpoint(ep: &Endpoint) -> Self
pub fn from_endpoint(ep: &Endpoint) -> Self
Get DiscoverKey from an Endpoint.
Trait Implementations§
Source§impl Clone for DiscoverKey
impl Clone for DiscoverKey
Source§fn clone(&self) -> DiscoverKey
fn clone(&self) -> DiscoverKey
Returns a duplicate 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 DiscoverKey
impl Debug for DiscoverKey
Source§impl Hash for DiscoverKey
impl Hash for DiscoverKey
Source§impl PartialEq for DiscoverKey
impl PartialEq for DiscoverKey
impl Eq for DiscoverKey
impl StructuralPartialEq for DiscoverKey
Auto Trait Implementations§
impl !Freeze for DiscoverKey
impl RefUnwindSafe for DiscoverKey
impl Send for DiscoverKey
impl Sync for DiscoverKey
impl Unpin for DiscoverKey
impl UnwindSafe for DiscoverKey
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
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.