pub enum PackageIdentifier {
Hash {
package_hash: PackageHash,
version: Option<EntityVersion>,
},
Name {
name: String,
version: Option<EntityVersion>,
},
HashWithMajorVersion {
package_hash: PackageHash,
protocol_version_major: Option<ProtocolVersionMajor>,
version: Option<EntityVersion>,
},
NameWithMajorVersion {
name: String,
protocol_version_major: Option<ProtocolVersionMajor>,
version: Option<EntityVersion>,
},
}Expand description
Identifier for the package object within a TransactionTarget::Stored or an
ExecutableDeployItem.
Variants§
Hash
The hash and optional version identifying the contract package.
Fields
package_hash: PackageHashThe hash of the contract package.
version: Option<EntityVersion>The version of the contract package.
None implies latest version.
Name
The name and optional version identifying the contract package.
Fields
version: Option<EntityVersion>The version of the contract package.
None implies latest version.
HashWithMajorVersion
The hash and optional version key identifying the contract package.
Fields
package_hash: PackageHashThe hash of the contract package.
protocol_version_major: Option<ProtocolVersionMajor>The major protocol version of the contract package.
None implies latest major protocol version.
version: Option<EntityVersion>The version of the contract package.
None implies latest version.
NameWithMajorVersion
The name and optional version key identifying the contract package.
Fields
protocol_version_major: Option<ProtocolVersionMajor>The major protocol version of the contract package.
None implies latest major protocol version.
version: Option<EntityVersion>The version of the contract package.
None implies latest version.
Implementations§
Source§impl PackageIdentifier
impl PackageIdentifier
Sourcepub fn version(&self) -> Option<EntityVersion>
pub fn version(&self) -> Option<EntityVersion>
Returns the optional version of the contract package.
None implies latest version.
Sourcepub fn protocol_version_major(&self) -> Option<ProtocolVersionMajor>
pub fn protocol_version_major(&self) -> Option<ProtocolVersionMajor>
Returns the optional version key of the contract package.
None implies latest version.
Trait Implementations§
Source§impl Clone for PackageIdentifier
impl Clone for PackageIdentifier
Source§fn clone(&self) -> PackageIdentifier
fn clone(&self) -> PackageIdentifier
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DataSize for PackageIdentifier
impl DataSize for PackageIdentifier
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 PackageIdentifier
impl Debug for PackageIdentifier
Source§impl<'de> Deserialize<'de> for PackageIdentifier
impl<'de> Deserialize<'de> for PackageIdentifier
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 Display for PackageIdentifier
impl Display for PackageIdentifier
Source§impl FromBytes for PackageIdentifier
impl FromBytes for PackageIdentifier
Source§impl Hash for PackageIdentifier
impl Hash for PackageIdentifier
Source§impl JsonSchema for PackageIdentifier
impl JsonSchema for PackageIdentifier
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 PackageIdentifier
impl Ord for PackageIdentifier
Source§fn cmp(&self, other: &PackageIdentifier) -> Ordering
fn cmp(&self, other: &PackageIdentifier) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for PackageIdentifier
impl PartialEq for PackageIdentifier
Source§impl PartialOrd for PackageIdentifier
impl PartialOrd for PackageIdentifier
Source§impl Serialize for PackageIdentifier
impl Serialize for PackageIdentifier
Source§impl ToBytes for PackageIdentifier
impl ToBytes for PackageIdentifier
Source§fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>
fn write_bytes(&self, writer: &mut Vec<u8>) -> Result<(), Error>
&self into a mutable writer.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 PackageIdentifier
impl StructuralPartialEq for PackageIdentifier
Auto Trait Implementations§
impl Freeze for PackageIdentifier
impl RefUnwindSafe for PackageIdentifier
impl Send for PackageIdentifier
impl Sync for PackageIdentifier
impl Unpin for PackageIdentifier
impl UnwindSafe for PackageIdentifier
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