pub enum ServiceEvent {
Initial(Vec<InstanceId>),
Added(InstanceId),
Removed(InstanceId),
Disconnected,
}Expand description
Event emitted by a service instance watch stream.
Variants§
Initial(Vec<InstanceId>)
Initial snapshot of all known instances for the service.
Added(InstanceId)
A new instance registered for the service.
Removed(InstanceId)
An instance was removed from the service.
Disconnected
The watch stream lost its connection to the backend.
Callers should treat the current instance set as stale and re-establish
the watch via ServiceDiscovery::watch_instances. This is the last
event the stream will emit before ending.
Trait Implementations§
Source§impl Clone for ServiceEvent
impl Clone for ServiceEvent
Source§fn clone(&self) -> ServiceEvent
fn clone(&self) -> ServiceEvent
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 ServiceEvent
impl Debug for ServiceEvent
impl Eq for ServiceEvent
Source§impl PartialEq for ServiceEvent
impl PartialEq for ServiceEvent
impl StructuralPartialEq for ServiceEvent
Auto Trait Implementations§
impl Freeze for ServiceEvent
impl RefUnwindSafe for ServiceEvent
impl Send for ServiceEvent
impl Sync for ServiceEvent
impl Unpin for ServiceEvent
impl UnsafeUnpin for ServiceEvent
impl UnwindSafe for ServiceEvent
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