pub struct HostGeneration {
pub service: String,
pub endpoint: String,
pub pid: u32,
pub process_started_ms: u64,
pub started_ms: u64,
}Expand description
One incarnation of a published host: the facts in service.json that change when the host is
replaced. Two values are the same generation only when every field is equal.
Limit: started_ms is the publication time in milliseconds. A host replaced inside the same
process within the same millisecond is indistinguishable here; a replacement process differs
in pid or process start time. A per-host instance nonce in service.json would close that
gap and is an open decision (see the CHANGELOG).
Fields§
§service: String§endpoint: String§pid: u32§process_started_ms: u64Birth time of the host process as the record states it; 0 when the writer did not know it.
started_ms: u64Publication time of the record.
Implementations§
Source§impl HostGeneration
impl HostGeneration
Sourcepub fn of(record: &ServiceRecord) -> Self
pub fn of(record: &ServiceRecord) -> Self
The generation a record names.
Trait Implementations§
Source§impl Clone for HostGeneration
impl Clone for HostGeneration
Source§impl Debug for HostGeneration
impl Debug for HostGeneration
impl Eq for HostGeneration
Source§impl Hash for HostGeneration
impl Hash for HostGeneration
Source§impl PartialEq for HostGeneration
impl PartialEq for HostGeneration
impl StructuralPartialEq for HostGeneration
Auto Trait Implementations§
impl Freeze for HostGeneration
impl RefUnwindSafe for HostGeneration
impl Send for HostGeneration
impl Sync for HostGeneration
impl Unpin for HostGeneration
impl UnsafeUnpin for HostGeneration
impl UnwindSafe for HostGeneration
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