pub struct RuntimeFootprint { /* private fields */ }Implementations§
Source§impl RuntimeFootprint
impl RuntimeFootprint
pub fn new( named_keys: NamedKeys, action_thresholds: BTreeMap<u8, Weight>, associated_keys: AssociatedKeys, entry_points: EntryPoints, entity_kind: EntityKind, main_purse: Option<URef>, runtime_address: RuntimeAddress, ) -> Self
pub fn new_account_footprint(account: Account) -> Self
pub fn new_contract_footprint( contract_hash: ContractHash, contract: Contract, system_entity_type: Option<SystemEntityType>, ) -> Self
pub fn new_entity_footprint( entity_addr: EntityAddr, entity: AddressableEntity, named_keys: NamedKeys, entry_points: EntryPoints, ) -> Self
pub fn package_hash(&self) -> Option<HashAddr>
pub fn associated_keys(&self) -> &AssociatedKeys
pub fn wasm_hash(&self) -> Option<HashAddr>
pub fn hash_addr(&self) -> HashAddr
pub fn named_keys(&self) -> &NamedKeys
pub fn insert_into_named_keys(&mut self, name: String, key: Key)
pub fn named_keys_mut(&mut self) -> &mut NamedKeys
pub fn take_named_keys(self) -> NamedKeys
pub fn main_purse(&self) -> Option<URef>
pub fn set_main_purse(&mut self, purse: URef)
pub fn entry_points(&self) -> &EntryPoints
pub fn entity_kind(&self) -> EntityKind
Checks whether all authorization keys are associated with this addressable entity.
Sourcepub fn can_manage_keys_with(
&self,
authorization_keys: &BTreeSet<AccountHash>,
) -> bool
pub fn can_manage_keys_with( &self, authorization_keys: &BTreeSet<AccountHash>, ) -> bool
Checks whether the sum of the weights of all authorization keys is greater or equal to key management threshold.
Sourcepub fn can_deploy_with(
&self,
authorization_keys: &BTreeSet<AccountHash>,
) -> bool
pub fn can_deploy_with( &self, authorization_keys: &BTreeSet<AccountHash>, ) -> bool
Checks whether the sum of the weights of all authorization keys is greater or equal to deploy threshold.
pub fn can_upgrade_with( &self, authorization_keys: &BTreeSet<AccountHash>, ) -> bool
Sourcepub fn extract_access_rights(&self, hash_addr: HashAddr) -> ContextAccessRights
pub fn extract_access_rights(&self, hash_addr: HashAddr) -> ContextAccessRights
Extracts the access rights from the named keys of the addressable entity.
Trait Implementations§
Source§impl Clone for RuntimeFootprint
impl Clone for RuntimeFootprint
Source§fn clone(&self) -> RuntimeFootprint
fn clone(&self) -> RuntimeFootprint
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 DataSize for RuntimeFootprint
impl DataSize for RuntimeFootprint
Source§const IS_DYNAMIC: bool = true
const IS_DYNAMIC: bool = true
If
true, the type has a heap size that can vary at runtime, depending on the actual value.Source§const STATIC_HEAP_SIZE: usize = 0usize
const STATIC_HEAP_SIZE: usize = 0usize
The amount of space a value of the type always occupies. If
IS_DYNAMIC is false, this is
the total amount of heap memory occupied by the value. Otherwise this is a lower bound.Source§fn estimate_heap_size(&self) -> usize
fn estimate_heap_size(&self) -> usize
Estimates the size of heap memory taken up by this value. Read more
Source§impl Debug for RuntimeFootprint
impl Debug for RuntimeFootprint
Source§impl PartialEq for RuntimeFootprint
impl PartialEq for RuntimeFootprint
impl Eq for RuntimeFootprint
impl StructuralPartialEq for RuntimeFootprint
Auto Trait Implementations§
impl Freeze for RuntimeFootprint
impl RefUnwindSafe for RuntimeFootprint
impl Send for RuntimeFootprint
impl Sync for RuntimeFootprint
impl Unpin for RuntimeFootprint
impl UnwindSafe for RuntimeFootprint
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> 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