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 PartialOrd for RolesMask
impl PartialOrd for RolesMask
impl 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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.