pub struct RoleData {
pub has_role: StorageMap<Address, StorageBool>,
pub admin_role: StorageFixedBytes<32>,
}
Expand description
Information about a specific role.
Fields§
§has_role: StorageMap<Address, StorageBool>
Whether an account is member of a certain role.
admin_role: StorageFixedBytes<32>
The admin role for this role.
Trait Implementations§
source§impl StorageType for RoleData
impl StorageType for RoleData
source§const SLOT_BYTES: usize = 32usize
const SLOT_BYTES: usize = 32usize
The number of bytes in a slot needed to represent the type. Must not exceed 32.
For types larger than 32 bytes that are stored inline with a struct’s fields,
set this to 32 and return the full size in
StorageType::new
. Read moresource§const REQUIRED_SLOTS: usize = 2usize
const REQUIRED_SLOTS: usize = 2usize
The number of words this type must fill. For primitives this is always 0.
For complex types requiring more than one inline word, set this to the total size.
source§type Wraps<'a> = StorageGuard<'a, RoleData>
where
Self: 'a
type Wraps<'a> = StorageGuard<'a, RoleData> where Self: 'a
For primitive types, this is the type being stored.
For collections, this is the
StorageType
being collected.source§type WrapsMut<'a> = StorageGuardMut<'a, RoleData>
where
Self: 'a
type WrapsMut<'a> = StorageGuardMut<'a, RoleData> where Self: 'a
Mutable accessor to the type being stored.
source§unsafe fn new(root: U256, offset: u8) -> Self
unsafe fn new(root: U256, offset: u8) -> Self
Where in persistent storage the type should live. Although useful for framework designers
creating new storage types, most user programs shouldn’t call this.
Note: implementations will have to be
const
once generic_const_exprs
stabilizes. Read moreAuto Trait Implementations§
impl !Freeze for RoleData
impl !RefUnwindSafe for RoleData
impl Send for RoleData
impl !Sync for RoleData
impl Unpin for RoleData
impl UnwindSafe for RoleData
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
Mutably borrows from an owned value. Read more