Enum casper_types::system::CallStackElement
source · pub enum CallStackElement {
Session {
account_hash: AccountHash,
},
StoredSession {
account_hash: AccountHash,
contract_package_hash: ContractPackageHash,
contract_hash: ContractHash,
},
StoredContract {
contract_package_hash: ContractPackageHash,
contract_hash: ContractHash,
},
}
Expand description
Represents the origin of a sub-call.
Variants§
Session
Fields
§
account_hash: AccountHash
The account hash of the caller
Session
StoredSession
Fields
§
account_hash: AccountHash
The account hash of the caller
§
contract_package_hash: ContractPackageHash
The contract package hash
§
contract_hash: ContractHash
The contract hash
Effectively an EntryPointType::Session - stored access to a session.
StoredContract
Fields
§
contract_package_hash: ContractPackageHash
The contract package hash
§
contract_hash: ContractHash
The contract hash
Contract
Implementations§
source§impl CallStackElement
impl CallStackElement
sourcepub fn session(account_hash: AccountHash) -> Self
pub fn session(account_hash: AccountHash) -> Self
Creates a CallStackElement::Session
. This represents a call into session code, and
should only ever happen once in a call stack.
sourcepub fn stored_contract(
contract_package_hash: ContractPackageHash,
contract_hash: ContractHash
) -> Self
pub fn stored_contract( contract_package_hash: ContractPackageHash, contract_hash: ContractHash ) -> Self
Creates a ['CallStackElement::StoredContract
]. This represents a call into a contract with
EntryPointType::Contract
.
sourcepub fn stored_session(
account_hash: AccountHash,
contract_package_hash: ContractPackageHash,
contract_hash: ContractHash
) -> Self
pub fn stored_session( account_hash: AccountHash, contract_package_hash: ContractPackageHash, contract_hash: ContractHash ) -> Self
Creates a ['CallStackElement::StoredSession
]. This represents a call into a contract with
EntryPointType::Session
.
sourcepub fn tag(&self) -> CallStackElementTag
pub fn tag(&self) -> CallStackElementTag
Gets the tag from self.
sourcepub fn contract_hash(&self) -> Option<&ContractHash>
pub fn contract_hash(&self) -> Option<&ContractHash>
Gets the ContractHash
for both stored session and stored contract variants.
Trait Implementations§
source§impl Clone for CallStackElement
impl Clone for CallStackElement
source§fn clone(&self) -> CallStackElement
fn clone(&self) -> CallStackElement
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 CallStackElement
impl Debug for CallStackElement
source§impl FromBytes for CallStackElement
impl FromBytes for CallStackElement
source§impl PartialEq for CallStackElement
impl PartialEq for CallStackElement
source§fn eq(&self, other: &CallStackElement) -> bool
fn eq(&self, other: &CallStackElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToBytes for CallStackElement
impl ToBytes for CallStackElement
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 CallStackElement
impl StructuralEq for CallStackElement
impl StructuralPartialEq for CallStackElement
Auto Trait Implementations§
impl RefUnwindSafe for CallStackElement
impl Send for CallStackElement
impl Sync for CallStackElement
impl Unpin for CallStackElement
impl UnwindSafe for CallStackElement
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