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
Session
Fields
§
account_hash: AccountHashThe account hash of the caller
StoredSession
Effectively an EntryPointType::Session - stored access to a session.
Fields
§
account_hash: AccountHashThe account hash of the caller
§
contract_package_hash: ContractPackageHashThe contract package hash
§
contract_hash: ContractHashThe contract hash
StoredContract
Contract
Fields
§
contract_package_hash: ContractPackageHashThe contract package hash
§
contract_hash: ContractHashThe contract hash
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 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 From<&Caller> for CallStackElement
impl From<&Caller> for CallStackElement
Source§impl FromBytes for CallStackElement
impl FromBytes for CallStackElement
Source§impl PartialEq for CallStackElement
impl PartialEq for CallStackElement
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 StructuralPartialEq for CallStackElement
Auto Trait Implementations§
impl Freeze for CallStackElement
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
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