Struct drt_chain_vm::world_mock::AccountDct
source · pub struct AccountDct(/* private fields */);
Implementations§
source§impl AccountDct
impl AccountDct
pub fn is_empty(&self) -> bool
pub fn get_by_identifier(&self, identifier: &[u8]) -> Option<&DctData>
pub fn set_roles(&mut self, token_identifier: Vec<u8>, roles: Vec<Vec<u8>>)
sourcepub fn get_by_identifier_or_default(&self, identifier: &[u8]) -> DctData
pub fn get_by_identifier_or_default(&self, identifier: &[u8]) -> DctData
Will provide a clone.
pub fn get_mut_by_identifier( &mut self, identifier: &[u8], ) -> Option<&mut DctData>
pub fn new_from_raw_map(hash: HashMap<Vec<u8>, DctData>) -> Self
pub fn increase_balance( &mut self, token_identifier: Vec<u8>, nonce: u64, value: &BigUint, metadata: DctInstanceMetadata, )
pub fn set_dct_balance( &mut self, token_identifier: Vec<u8>, nonce: u64, value: &BigUint, metadata: DctInstanceMetadata, )
pub fn get_dct_balance(&self, token_identifier: &[u8], nonce: u64) -> BigUint
pub fn add_uris( &mut self, token_identifier: &[u8], nonce: u64, new_uris: Vec<Vec<u8>>, )
pub fn update_attributes( &mut self, token_identifier: &[u8], nonce: u64, new_attribute_bytes: Vec<u8>, )
pub fn iter(&self) -> Iter<'_, Vec<u8>, DctData>
pub fn set_special_role(&mut self, token_identifier: &[u8], role: &[u8])
pub fn register_and_set_roles( &mut self, token_identifier: &[u8], token_type: VMTokenType, )
Trait Implementations§
source§impl Clone for AccountDct
impl Clone for AccountDct
source§fn clone(&self) -> AccountDct
fn clone(&self) -> AccountDct
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AccountDct
impl Debug for AccountDct
source§impl Default for AccountDct
impl Default for AccountDct
source§fn default() -> AccountDct
fn default() -> AccountDct
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AccountDct
impl RefUnwindSafe for AccountDct
impl Send for AccountDct
impl Sync for AccountDct
impl Unpin for AccountDct
impl UnwindSafe for AccountDct
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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>
Converts
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>
Converts
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