pub struct TernaryNode {
pub id: NodeId,
pub state: Trit,
pub peers: HashSet<NodeId>,
pub vector_clock: VectorClock,
pub is_alive: bool,
}Expand description
A node in a ternary distributed system.
Each node holds a ternary state and participates in gossip, consensus, and anti-entropy protocols.
Fields§
§id: NodeId§state: Trit§peers: HashSet<NodeId>§vector_clock: VectorClock§is_alive: boolImplementations§
Trait Implementations§
Source§impl Clone for TernaryNode
impl Clone for TernaryNode
Source§fn clone(&self) -> TernaryNode
fn clone(&self) -> TernaryNode
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 moreAuto Trait Implementations§
impl Freeze for TernaryNode
impl RefUnwindSafe for TernaryNode
impl Send for TernaryNode
impl Sync for TernaryNode
impl Unpin for TernaryNode
impl UnsafeUnpin for TernaryNode
impl UnwindSafe for TernaryNode
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