#[non_exhaustive]pub enum RotationEvent {
Announced {
old: PeerId,
new: PeerId,
},
Promoted {
old: PeerId,
new: PeerId,
retires: SystemTime,
},
}Expand description
A change of a peer’s key, for the caller to report as it chooses.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Announced
The peer accepted as old announced new as its successor.
Promoted
new was promoted: it is accepted, and old retires at retires.
Trait Implementations§
Source§impl Clone for RotationEvent
impl Clone for RotationEvent
impl Copy for RotationEvent
Source§impl Debug for RotationEvent
impl Debug for RotationEvent
impl Eq for RotationEvent
Source§impl PartialEq for RotationEvent
impl PartialEq for RotationEvent
impl StructuralPartialEq for RotationEvent
Auto Trait Implementations§
impl Freeze for RotationEvent
impl RefUnwindSafe for RotationEvent
impl Send for RotationEvent
impl Sync for RotationEvent
impl Unpin for RotationEvent
impl UnsafeUnpin for RotationEvent
impl UnwindSafe for RotationEvent
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