pub struct HostRecord { /* private fields */ }Expand description
Product-neutral managed host record.
Implementations§
Source§impl HostRecord
impl HostRecord
Sourcepub fn new(id: HostId, endpoint: HostEndpoint) -> Self
pub fn new(id: HostId, endpoint: HostEndpoint) -> Self
Creates a host and derives its revision from endpoint material.
Sourcepub fn with_label(self, label: impl Into<String>) -> Result<Self, TopologyError>
pub fn with_label(self, label: impl Into<String>) -> Result<Self, TopologyError>
Adds a normalized host label.
Sourcepub fn with_capability(self, capability: CapabilityName) -> Self
pub fn with_capability(self, capability: CapabilityName) -> Self
Adds an advertised capability.
Sourcepub fn endpoint(&self) -> &HostEndpoint
pub fn endpoint(&self) -> &HostEndpoint
Returns the transport endpoint.
Sourcepub fn revision(&self) -> &TopologyRevision
pub fn revision(&self) -> &TopologyRevision
Returns the transport-affecting topology revision.
Sourcepub fn capabilities(&self) -> impl Iterator<Item = &CapabilityName>
pub fn capabilities(&self) -> impl Iterator<Item = &CapabilityName>
Iterates over advertised capabilities.
Trait Implementations§
Source§impl Clone for HostRecord
impl Clone for HostRecord
Source§fn clone(&self) -> HostRecord
fn clone(&self) -> HostRecord
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 moreSource§impl Debug for HostRecord
impl Debug for HostRecord
Source§impl<'de> Deserialize<'de> for HostRecord
impl<'de> Deserialize<'de> for HostRecord
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for HostRecord
impl PartialEq for HostRecord
Source§fn eq(&self, other: &HostRecord) -> bool
fn eq(&self, other: &HostRecord) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for HostRecord
impl Serialize for HostRecord
impl Eq for HostRecord
impl StructuralPartialEq for HostRecord
Auto Trait Implementations§
impl Freeze for HostRecord
impl RefUnwindSafe for HostRecord
impl Send for HostRecord
impl Sync for HostRecord
impl Unpin for HostRecord
impl UnsafeUnpin for HostRecord
impl UnwindSafe for HostRecord
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.