pub struct SystemHashRegistry(/* private fields */);Expand description
The system entity registry.
Implementations§
Source§impl SystemHashRegistry
impl SystemHashRegistry
Sourcepub fn insert(&mut self, contract_name: String, contract_hash: HashAddr)
pub fn insert(&mut self, contract_name: String, contract_hash: HashAddr)
Inserts a contract’s details into the registry.
Sourcepub fn get(&self, contract_name: &str) -> Option<&HashAddr>
pub fn get(&self, contract_name: &str) -> Option<&HashAddr>
Gets a contract’s hash from the registry.
Sourcepub fn exists(&self, hash_addr: &HashAddr) -> bool
pub fn exists(&self, hash_addr: &HashAddr) -> bool
Returns true if the given hash_addr exists as a value in the registry.
Sourcepub fn remove_standard_payment(&mut self) -> Option<HashAddr>
pub fn remove_standard_payment(&mut self) -> Option<HashAddr>
Remove standard payment from the contract registry.
pub fn inner(self) -> BTreeMap<String, HashAddr>
Trait Implementations§
Source§impl Clone for SystemHashRegistry
impl Clone for SystemHashRegistry
Source§fn clone(&self) -> SystemHashRegistry
fn clone(&self) -> SystemHashRegistry
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 SystemHashRegistry
impl Debug for SystemHashRegistry
Source§impl<'de> Deserialize<'de> for SystemHashRegistry
impl<'de> Deserialize<'de> for SystemHashRegistry
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromBytes for SystemHashRegistry
impl FromBytes for SystemHashRegistry
Source§impl Hash for SystemHashRegistry
impl Hash for SystemHashRegistry
Source§impl Ord for SystemHashRegistry
impl Ord for SystemHashRegistry
Source§fn cmp(&self, other: &SystemHashRegistry) -> Ordering
fn cmp(&self, other: &SystemHashRegistry) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SystemHashRegistry
impl PartialEq for SystemHashRegistry
Source§impl PartialOrd for SystemHashRegistry
impl PartialOrd for SystemHashRegistry
Source§impl Serialize for SystemHashRegistry
impl Serialize for SystemHashRegistry
Source§impl ToBytes for SystemHashRegistry
impl ToBytes for SystemHashRegistry
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8> which would be returned from a successful call to
to_bytes() or into_bytes(). The data is not actually serialized, so this call is
relatively cheap.impl Eq for SystemHashRegistry
impl StructuralPartialEq for SystemHashRegistry
Auto Trait Implementations§
impl Freeze for SystemHashRegistry
impl RefUnwindSafe for SystemHashRegistry
impl Send for SystemHashRegistry
impl Sync for SystemHashRegistry
impl Unpin for SystemHashRegistry
impl UnwindSafe for SystemHashRegistry
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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.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>
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