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: StringUser 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<BasicNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BasicNode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BasicNode
impl Serialize for BasicNode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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 UnsafeUnpin 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