pub struct FleetSnapshot {
pub updated_ms: u64,
pub local_worker_id: String,
pub workers: Vec<FleetWorker>,
}Expand description
What relay serve publishes for local readers.
Fields§
§updated_ms: u64When this snapshot was written (epoch ms).
local_worker_id: StringThis machine’s relay identity.
workers: Vec<FleetWorker>Remote peers only. Local sessions are deliberately excluded: a reader on this machine already discovers those itself, and including them here would list every local session twice.
Implementations§
Source§impl FleetSnapshot
impl FleetSnapshot
Sourcepub fn live_workers(&self) -> Vec<&FleetWorker>
pub fn live_workers(&self) -> Vec<&FleetWorker>
Peers still reporting. The one place staleness is decided, so a reader can’t count one set of workers and display another.
Trait Implementations§
Source§impl Clone for FleetSnapshot
impl Clone for FleetSnapshot
Source§impl Debug for FleetSnapshot
impl Debug for FleetSnapshot
Source§impl<'de> Deserialize<'de> for FleetSnapshot
impl<'de> Deserialize<'de> for FleetSnapshot
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
Auto Trait Implementations§
impl Freeze for FleetSnapshot
impl RefUnwindSafe for FleetSnapshot
impl Send for FleetSnapshot
impl Sync for FleetSnapshot
impl Unpin for FleetSnapshot
impl UnsafeUnpin for FleetSnapshot
impl UnwindSafe for FleetSnapshot
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more