pub struct Metadata(pub ModuleHandle);
Tuple Fields§
§0: ModuleHandle
Implementations§
source§impl Metadata
impl Metadata
pub fn new() -> Self
pub fn new_with_data(data: MetadataInit) -> Self
pub fn set<K: AsRef<str>, V: MetadataVal>(&self, name: K, value: V)
pub fn get<K: ToString, V: MetadataVal>( &self, name: K ) -> Result<Option<V>, MetadataConversionError>
pub fn get_string<K: ToString>( &self, name: K ) -> Result<Option<String>, MetadataConversionError>
pub fn remove<K: ToString>(&self, name: K) -> bool
pub fn lock<K: ToString>(&self, name: K)
Trait Implementations§
source§impl Attachable for Metadata
impl Attachable for Metadata
const MODULE_ID: AttachedModuleId = AttachedModuleId::Metadata
fn new(handle: ModuleHandle) -> Self
fn handle(&self) -> &ModuleHandle
fn attached(address: GlobalAddress) -> Self
fn self_attached() -> Self
fn call<A: ScryptoEncode, T: ScryptoDecode>(&self, method: &str, args: &A) -> T
fn call_raw(&self, method: &str, args: Vec<u8>) -> Vec<u8> ⓘ
fn call_ignore_rtn<A: ScryptoEncode>(&self, method: &str, args: &A)
source§impl PartialEq for Metadata
impl PartialEq for Metadata
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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
Checks if this value is equivalent to the given key. Read more