pub enum DictionaryItemIdentifier {
AccountNamedKey {
key: String,
dictionary_name: String,
dictionary_item_key: String,
},
ContractNamedKey {
key: String,
dictionary_name: String,
dictionary_item_key: String,
},
EntityNamedKey {
key: String,
dictionary_name: String,
dictionary_item_key: String,
},
URef {
seed_uref: URef,
dictionary_item_key: String,
},
Dictionary(String),
}Expand description
The identifier for a dictionary item.
Variants§
AccountNamedKey
A dictionary item identified via an Key::Account’s named keys.
Fields
key: StringThe Key::Account as a formatted string, identifying the account whose named keys
contains dictionary_name.
ContractNamedKey
A dictionary item identified via a Key::Hash’s named keys.
Fields
EntityNamedKey
A dictionary item identified via a Key::AddressableEntity’s named keys.
Fields
key: StringThe Key::AddressableEntity as a formatted string, identifying the entity whose
named keys contain dictionary_name.
URef
A dictionary item identified via its seed Key::URef.
Fields
Dictionary(String)
A dictionary item identified via its unique address derived from the dictionary’s seed
URef and the item’s key within the dictionary. The key must be a Key::Dictionary
variant, as a formatted string.
Implementations§
Source§impl DictionaryItemIdentifier
impl DictionaryItemIdentifier
Sourcepub fn new_from_account_info(
account_hash: AccountHash,
dictionary_name: String,
dictionary_item_key: String,
) -> Self
pub fn new_from_account_info( account_hash: AccountHash, dictionary_name: String, dictionary_item_key: String, ) -> Self
Returns a new DictionaryItemIdentifier::AccountNamedKey variant.
Sourcepub fn new_from_contract_info(
contract_addr: HashAddr,
dictionary_name: String,
dictionary_item_key: String,
) -> Self
pub fn new_from_contract_info( contract_addr: HashAddr, dictionary_name: String, dictionary_item_key: String, ) -> Self
Returns a new DictionaryItemIdentifier::ContractNamedKey variant.
Sourcepub fn new_from_entity_info(
entity_addr: EntityAddr,
dictionary_name: String,
dictionary_item_key: String,
) -> Self
pub fn new_from_entity_info( entity_addr: EntityAddr, dictionary_name: String, dictionary_item_key: String, ) -> Self
Returns a new DictionaryItemIdentifier::EntityNamedKey variant.
Sourcepub fn new_from_seed_uref(seed_uref: URef, dictionary_item_key: String) -> Self
pub fn new_from_seed_uref(seed_uref: URef, dictionary_item_key: String) -> Self
Returns a new DictionaryItemIdentifier::URef variant.
Sourcepub fn new_from_item_key(item_key: Key) -> Result<Self, Error>
pub fn new_from_item_key(item_key: Key) -> Result<Self, Error>
Returns a new DictionaryItemIdentifier::Dictionary variant.
Trait Implementations§
Source§impl Clone for DictionaryItemIdentifier
impl Clone for DictionaryItemIdentifier
Source§fn clone(&self) -> DictionaryItemIdentifier
fn clone(&self) -> DictionaryItemIdentifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DictionaryItemIdentifier
impl Debug for DictionaryItemIdentifier
Source§impl<'de> Deserialize<'de> for DictionaryItemIdentifier
impl<'de> Deserialize<'de> for DictionaryItemIdentifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for DictionaryItemIdentifier
impl Serialize for DictionaryItemIdentifier
Source§impl<'a> TryFrom<DictionaryItemStrParams<'a>> for DictionaryItemIdentifier
impl<'a> TryFrom<DictionaryItemStrParams<'a>> for DictionaryItemIdentifier
Auto Trait Implementations§
impl Freeze for DictionaryItemIdentifier
impl RefUnwindSafe for DictionaryItemIdentifier
impl Send for DictionaryItemIdentifier
impl Sync for DictionaryItemIdentifier
impl Unpin for DictionaryItemIdentifier
impl UnwindSafe for DictionaryItemIdentifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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