pub struct BasicNode {
pub addr: String,
}
Expand description
An implementation of trait Node
that contains minimal node information.
The most common usage is to store the connecting address of a node.
So that an application does not need an additional store to support its
RaftNetwork
implementation.
An application is also free not to use this storage and implements its own node-id to address mapping.
Fields§
§addr: String
User defined string that represent the endpoint of the target node.
It is used by RaftNetwork
for connecting to target node.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for BasicNode
impl<'de> Deserialize<'de> for BasicNode
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
source§impl PartialEq for BasicNode
impl PartialEq for BasicNode
impl Eq for BasicNode
impl StructuralPartialEq for BasicNode
Auto Trait Implementations§
impl Freeze for BasicNode
impl RefUnwindSafe for BasicNode
impl Send for BasicNode
impl Sync for BasicNode
impl Unpin for BasicNode
impl UnwindSafe for BasicNode
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