Struct data_chain::node_block::NodeBlock
[−]
[src]
pub struct NodeBlock { /* fields omitted */ }
If data block then this is sent by any group member when data is Put
, Post
or Delete
.
If this is a link then it is sent with a churn
event.
A Link
is a nodeblock that each member must send each other in times of churn.
These will not accumulate but be ManagedNode
to ManagedNode
messages in the routing layer
Methods
impl NodeBlock
[src]
pub fn new(
pub_key: &PublicKey,
secret_key: &SecretKey,
data_identifier: BlockIdentifier
) -> Result<NodeBlock, Error>
[src]
pub_key: &PublicKey,
secret_key: &SecretKey,
data_identifier: BlockIdentifier
) -> Result<NodeBlock, Error>
Create a Block (used by nodes in network to send to holders of DataChains
)
pub fn identifier(&self) -> &BlockIdentifier
[src]
Getter
pub fn proof(&self) -> &NodeBlockProof
[src]
Getter
pub fn validate(&self) -> bool
[src]
validate signed correctly
pub fn validate_detached(&self, identifier: BlockIdentifier) -> bool
[src]
validate signed correctly
Trait Implementations
impl Encodable for NodeBlock
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
[src]
Serialize a value using an Encoder
.
impl Decodable for NodeBlock
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<NodeBlock, __D::Error>
[src]
Deserialize a value using a Decoder
.
impl PartialEq for NodeBlock
[src]
fn eq(&self, __arg_0: &NodeBlock) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NodeBlock) -> bool
[src]
This method tests for !=
.
impl Debug for NodeBlock
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more