Struct oasis_core_runtime::consensus::registry::Node
source · pub struct Node {
pub v: u16,
pub id: PublicKey,
pub entity_id: PublicKey,
pub expiration: u64,
pub tls: TLSInfo,
pub p2p: P2PInfo,
pub consensus: ConsensusInfo,
pub vrf: VRFInfo,
pub runtimes: Option<Vec<NodeRuntime>>,
pub roles: RolesMask,
pub software_version: Option<String>,
}
Expand description
Node registry descriptor.
Fields§
§v: u16
Structure version.
id: PublicKey
Public key identifying the node.
entity_id: PublicKey
Public key identifying the Entity controlling the node.
expiration: u64
Epoch in which the node’s commitment expires.
tls: TLSInfo
Information for connecting to this node via TLS.
p2p: P2PInfo
Information for connecting to this node via P2P.
consensus: ConsensusInfo
Information for connecting to this node as a consensus member.
vrf: VRFInfo
Information for this node’s participation in VRF based elections.
runtimes: Option<Vec<NodeRuntime>>
Node’s runtimes.
roles: RolesMask
Bitmask representing the node roles.
software_version: Option<String>
Node’s oasis-node software version.
Implementations§
source§impl Node
impl Node
sourcepub fn has_roles(&self, roles: RolesMask) -> bool
pub fn has_roles(&self, roles: RolesMask) -> bool
Checks whether the node has any of the specified roles.
sourcepub fn has_tee(
&self,
identity: &Identity,
runtime_id: &Namespace,
version: &Version,
) -> bool
pub fn has_tee( &self, identity: &Identity, runtime_id: &Namespace, version: &Version, ) -> bool
Checks whether the node has the provided TEE identity configured.
sourcepub fn get_runtime(
&self,
runtime_id: &Namespace,
version: &Version,
) -> Option<NodeRuntime>
pub fn get_runtime( &self, runtime_id: &Namespace, version: &Version, ) -> Option<NodeRuntime>
Searches for an existing supported runtime descriptor in runtimes with the specified version and returns it.
Trait Implementations§
source§impl Decode for Node
impl Decode for Node
source§fn try_default() -> Result<Self, DecodeError>
fn try_default() -> Result<Self, DecodeError>
Try to decode from a missing/null/undefined value.
source§fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
Try to decode from a given CBOR value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default
in case the value is null or
undefined.source§impl EncodeAsMap for Node
impl EncodeAsMap for Node
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
source§impl PartialEq for Node
impl PartialEq for Node
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.