Struct oasis_core_runtime::consensus::registry::RolesMask
source · pub struct RolesMask(pub u32);
Expand description
Oasis node roles bitmask.
Tuple Fields§
§0: u32
Implementations§
source§impl RolesMask
impl RolesMask
sourcepub const ROLE_EMPTY: RolesMask = _
pub const ROLE_EMPTY: RolesMask = _
Empty roles mask.
sourcepub const ROLE_COMPUTE_WORKER: RolesMask = _
pub const ROLE_COMPUTE_WORKER: RolesMask = _
Compute worker role.
sourcepub const ROLE_OBSERVER: RolesMask = _
pub const ROLE_OBSERVER: RolesMask = _
Observer role.
sourcepub const ROLE_KEY_MANAGER: RolesMask = _
pub const ROLE_KEY_MANAGER: RolesMask = _
Key manager role.
sourcepub const ROLE_VALIDATOR: RolesMask = _
pub const ROLE_VALIDATOR: RolesMask = _
Validator role.
sourcepub const ROLE_RESERVED_3: RolesMask = _
pub const ROLE_RESERVED_3: RolesMask = _
Public consensus RPC services worker role.
sourcepub const ROLE_STORAGE_RPC: RolesMask = _
pub const ROLE_STORAGE_RPC: RolesMask = _
Public storage RPC services worker role.
pub const ROLES_RESERVED: RolesMask = _
sourcepub fn contains(&self, role: RolesMask) -> bool
pub fn contains(&self, role: RolesMask) -> bool
Whether the roles mask contains any of the specified roles.
sourcepub fn is_single_role(&self) -> bool
pub fn is_single_role(&self) -> bool
Whether the roles mask encodes a single valid role.
Trait Implementations§
source§impl Decode for RolesMask
impl Decode for RolesMask
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 Ord for RolesMask
impl Ord for RolesMask
source§impl PartialEq for RolesMask
impl PartialEq for RolesMask
source§impl PartialOrd for RolesMask
impl PartialOrd for RolesMask
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for RolesMask
impl Eq for RolesMask
impl StructuralPartialEq for RolesMask
Auto Trait Implementations§
impl Freeze for RolesMask
impl RefUnwindSafe for RolesMask
impl Send for RolesMask
impl Sync for RolesMask
impl Unpin for RolesMask
impl UnwindSafe for RolesMask
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.