pub struct NodeMetadata {
pub transport_info: Option<TransportInfo>,
pub public_key: Option<PublicKey>,
pub node_type: Option<i32>,
pub version_info: Option<VersionInfo>,
pub partition_info: Option<PartitionInfo>,
pub node_name: Option<String>,
pub peer_id: Option<PeerId>,
pub parties: Vec<PartyId>,
}Expand description
Per node (machine) metadata, intended to be updated automatically by the hot key on the machine
Fields§
§transport_info: Option<TransportInfo>Information about how to contact the node
public_key: Option<PublicKey>Public key associated with the node signatures for real-time signatures, such as observations
node_type: Option<i32>What type of node this is, in terms of whether it stays online consistently or is ephemeral and can’t be relied upon to be continuously online.
version_info: Option<VersionInfo>Information about the executable and other checksums, also used for coordinating upgrades
partition_info: Option<PartitionInfo>Distances to various types of hashes for partitioning and storage of data. Used for optimizing gossip and long term storage.
node_name: Option<String>Identifier for the particular machine, not guaranteed to be unique across network. Public key should be used primarily, this is only for convenience.
peer_id: Option<PeerId>Corresponding public key of the overall identity controlling this, and other nodes
parties: Vec<PartyId>Parties of participation. Used for multi-party computation and other multi-party operations.
Implementations§
Source§impl NodeMetadata
impl NodeMetadata
Source§impl NodeMetadata
impl NodeMetadata
pub fn nat_traversal_required(&self) -> bool
pub fn port_or(&self, network: NetworkEnvironment) -> u16
pub fn public_key_bytes(&self) -> Result<Vec<u8>, ErrorInfo>
pub fn long_identifier(&self) -> String
pub fn external_address(&self) -> RgResult<String>
pub fn tx_in_range(&self, h: &Hash) -> bool
pub fn hash_in_range( &self, h: &Hash, f: fn(&PartitionInfo) -> Option<i64>, ) -> bool
Trait Implementations§
Source§impl Clone for NodeMetadata
impl Clone for NodeMetadata
Source§fn clone(&self) -> NodeMetadata
fn clone(&self) -> NodeMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NodeMetadata
impl Debug for NodeMetadata
Source§impl Default for NodeMetadata
impl Default for NodeMetadata
Source§impl<'de> Deserialize<'de> for NodeMetadata
impl<'de> Deserialize<'de> for NodeMetadata
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>,
Source§impl Hash for NodeMetadata
impl Hash for NodeMetadata
Source§impl HashClear for NodeMetadata
impl HashClear for NodeMetadata
fn hash_clear(&mut self)
Source§impl Message for NodeMetadata
impl Message for NodeMetadata
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.Source§impl PartialEq for NodeMetadata
impl PartialEq for NodeMetadata
Source§impl Serialize for NodeMetadata
impl Serialize for NodeMetadata
Source§impl XorfConvDistanceSubset<NodeMetadata> for Vec<NodeMetadata>
impl XorfConvDistanceSubset<NodeMetadata> for Vec<NodeMetadata>
fn xorf_conv_distance_subset<F>( &self, other: &Vec<u8>, partition_func: F, ) -> Vec<&NodeMetadata>
impl Eq for NodeMetadata
impl StructuralPartialEq for NodeMetadata
Auto Trait Implementations§
impl Freeze for NodeMetadata
impl RefUnwindSafe for NodeMetadata
impl Send for NodeMetadata
impl Sync for NodeMetadata
impl Unpin for NodeMetadata
impl UnwindSafe for NodeMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more