pub enum TransactionInvocationTarget {
ByHash(HashAddr),
ByName(String),
ByPackageHash {
addr: PackageAddr,
version: Option<EntityVersion>,
protocol_version_major: Option<ProtocolVersionMajor>,
},
ByPackageName {
name: String,
version: Option<EntityVersion>,
protocol_version_major: Option<ProtocolVersionMajor>,
},
}
Expand description
The identifier of a crate::TransactionTarget::Stored
.
Variants§
ByHash(HashAddr)
The address identifying the invocable entity.
ByName(String)
The alias identifying the invocable entity.
ByPackageHash
The address and optional version identifying the package.
Fields
addr: PackageAddr
The package address.
version: Option<EntityVersion>
The package version.
If None
, the latest enabled version is implied.
protocol_version_major: Option<ProtocolVersionMajor>
The major protocol version of the contract package.
None
implies latest major protocol version.
ByPackageName
The alias and optional version identifying the package.
Fields
version: Option<EntityVersion>
The package version.
If None
, the latest enabled version is implied.
protocol_version_major: Option<ProtocolVersionMajor>
The major protocol version of the contract package.
None
implies latest major protocol version.
Implementations§
Source§impl TransactionInvocationTarget
impl TransactionInvocationTarget
Sourcepub fn new_invocable_entity(hash: AddressableEntityHash) -> Self
pub fn new_invocable_entity(hash: AddressableEntityHash) -> Self
Returns a new TransactionInvocationTarget::InvocableEntity
.
Sourcepub fn new_invocable_entity_alias(alias: String) -> Self
pub fn new_invocable_entity_alias(alias: String) -> Self
Returns a new TransactionInvocationTarget::InvocableEntityAlias
.
Sourcepub fn new_package(hash: PackageHash, version: Option<EntityVersion>) -> Self
👎Deprecated since 5.0.1: please use new_package_with_major
instead
pub fn new_package(hash: PackageHash, version: Option<EntityVersion>) -> Self
new_package_with_major
insteadReturns a new TransactionInvocationTarget::Package
.
Sourcepub fn new_package_with_major(
hash: PackageHash,
version: Option<EntityVersion>,
protocol_version_major: Option<ProtocolVersionMajor>,
) -> Self
pub fn new_package_with_major( hash: PackageHash, version: Option<EntityVersion>, protocol_version_major: Option<ProtocolVersionMajor>, ) -> Self
Returns a new TransactionInvocationTarget::Package
.
Sourcepub fn new_package_alias(alias: String, version: Option<EntityVersion>) -> Self
👎Deprecated since 5.0.1: please use new_package_alias_with_major
instead
pub fn new_package_alias(alias: String, version: Option<EntityVersion>) -> Self
new_package_alias_with_major
insteadReturns a new TransactionInvocationTarget::PackageAlias
.
Sourcepub fn new_package_alias_with_major(
alias: String,
version: Option<EntityVersion>,
protocol_version_major: Option<ProtocolVersionMajor>,
) -> Self
pub fn new_package_alias_with_major( alias: String, version: Option<EntityVersion>, protocol_version_major: Option<ProtocolVersionMajor>, ) -> Self
Returns a new TransactionInvocationTarget::PackageAlias
.
Sourcepub fn contract_by_hash(&self) -> Option<HashAddr>
pub fn contract_by_hash(&self) -> Option<HashAddr>
Returns the contract hash_addr
, if any.
Sourcepub fn addressable_entity_identifier(
&self,
) -> Option<AddressableEntityIdentifier>
pub fn addressable_entity_identifier( &self, ) -> Option<AddressableEntityIdentifier>
Returns the identifier of the addressable entity, if present.
Sourcepub fn package_identifier(&self) -> Option<PackageIdentifier>
pub fn package_identifier(&self) -> Option<PackageIdentifier>
Returns the identifier of the contract package, if present.
Trait Implementations§
Source§impl Clone for TransactionInvocationTarget
impl Clone for TransactionInvocationTarget
Source§fn clone(&self) -> TransactionInvocationTarget
fn clone(&self) -> TransactionInvocationTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl DataSize for TransactionInvocationTarget
impl DataSize for TransactionInvocationTarget
Source§const IS_DYNAMIC: bool = true
const IS_DYNAMIC: bool = true
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
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
Source§impl Debug for TransactionInvocationTarget
impl Debug for TransactionInvocationTarget
Source§impl<'de> Deserialize<'de> for TransactionInvocationTarget
impl<'de> Deserialize<'de> for TransactionInvocationTarget
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>,
Source§impl Hash for TransactionInvocationTarget
impl Hash for TransactionInvocationTarget
Source§impl JsonSchema for TransactionInvocationTarget
impl JsonSchema for TransactionInvocationTarget
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moreSource§impl Ord for TransactionInvocationTarget
impl Ord for TransactionInvocationTarget
Source§fn cmp(&self, other: &TransactionInvocationTarget) -> Ordering
fn cmp(&self, other: &TransactionInvocationTarget) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for TransactionInvocationTarget
impl PartialOrd for TransactionInvocationTarget
Source§impl ToBytes for TransactionInvocationTarget
impl ToBytes for TransactionInvocationTarget
Source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
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 TransactionInvocationTarget
impl StructuralPartialEq for TransactionInvocationTarget
Auto Trait Implementations§
impl Freeze for TransactionInvocationTarget
impl RefUnwindSafe for TransactionInvocationTarget
impl Send for TransactionInvocationTarget
impl Sync for TransactionInvocationTarget
impl Unpin for TransactionInvocationTarget
impl UnwindSafe for TransactionInvocationTarget
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
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
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
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>
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>
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