#[non_exhaustive]pub enum ContractContainer {
    Wasm(ContractWasmAPIVersion),
}Expand description
Wrapper that allows contract versioning. This enum maintains the types of contracts that are allowed and their corresponding version.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Wasm(ContractWasmAPIVersion)
Implementations§
Source§impl ContractContainer
 
impl ContractContainer
Sourcepub fn key(&self) -> ContractKey
 
pub fn key(&self) -> ContractKey
Return the ContractKey from the specific contract version.
Sourcepub fn id(&self) -> &ContractInstanceId
 
pub fn id(&self) -> &ContractInstanceId
Return the ContractInstanceId from the specific contract version.
Sourcepub fn params(&self) -> Parameters<'static>
 
pub fn params(&self) -> Parameters<'static>
Return the Parameters from the specific contract version.
Sourcepub fn data(&self) -> &[u8] ⓘ
 
pub fn data(&self) -> &[u8] ⓘ
Return the contract code from the specific contract version as Vec<u8>.
pub fn unwrap_v1(self) -> WrappedContract
Trait Implementations§
Source§impl Clone for ContractContainer
 
impl Clone for ContractContainer
Source§fn clone(&self) -> ContractContainer
 
fn clone(&self) -> ContractContainer
Returns a duplicate 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 ContractContainer
 
impl Debug for ContractContainer
Source§impl<'de> Deserialize<'de> for ContractContainer
 
impl<'de> Deserialize<'de> for ContractContainer
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ContractContainer
 
impl Display for ContractContainer
Source§impl From<ContractContainer> for APIVersion
 
impl From<ContractContainer> for APIVersion
Source§fn from(contract: ContractContainer) -> APIVersion
 
fn from(contract: ContractContainer) -> APIVersion
Converts to this type from the input type.
Source§impl From<ContractWasmAPIVersion> for ContractContainer
 
impl From<ContractWasmAPIVersion> for ContractContainer
Source§fn from(value: ContractWasmAPIVersion) -> Self
 
fn from(value: ContractWasmAPIVersion) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ContractContainer
 
impl PartialEq for ContractContainer
Source§impl Serialize for ContractContainer
 
impl Serialize for ContractContainer
Source§impl<'a> TryFrom<(&'a Path, Parameters<'static>)> for ContractContainer
 
impl<'a> TryFrom<(&'a Path, Parameters<'static>)> for ContractContainer
Source§impl<'a, P> TryFrom<(Vec<u8>, P)> for ContractContainerwhere
    P: Deref<Target = Parameters<'a>>,
 
impl<'a, P> TryFrom<(Vec<u8>, P)> for ContractContainerwhere
    P: Deref<Target = Parameters<'a>>,
impl Eq for ContractContainer
impl StructuralPartialEq for ContractContainer
Auto Trait Implementations§
impl Freeze for ContractContainer
impl RefUnwindSafe for ContractContainer
impl Send for ContractContainer
impl Sync for ContractContainer
impl Unpin for ContractContainer
impl UnwindSafe for ContractContainer
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