#[repr(u8)]pub enum WasmVersion {
V0 = 0,
V1 = 1,
}Expand description
Version of the module. This determines the chain API that the module can access.
Variants§
V0 = 0
The initial smart contracts version. This has a simple state API that
has very limited capacity. V0 contracts also use message-passing as
the interaction method.
V1 = 1
V1 contracts were introduced with protocol version 4. In comparison to
V0 contracts they use synchronous calls as the interaction method,
and they have access to a more fine-grained state API allowing for
unlimited (apart from NRG costs) state size.
Trait Implementations§
Source§impl Clone for WasmVersion
impl Clone for WasmVersion
Source§fn clone(&self) -> WasmVersion
fn clone(&self) -> WasmVersion
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 WasmVersion
impl Debug for WasmVersion
Source§impl Default for WasmVersion
V0 is the default version of smart contracts.
impl Default for WasmVersion
V0 is the default version of smart contracts.
Source§fn default() -> WasmVersion
fn default() -> WasmVersion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WasmVersion
impl<'de> Deserialize<'de> for WasmVersion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WasmVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WasmVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for WasmVersion
impl Display for WasmVersion
Source§impl FromStr for WasmVersion
impl FromStr for WasmVersion
Source§type Err = WasmVersionParseError
type Err = WasmVersionParseError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<WasmVersion, <WasmVersion as FromStr>::Err>
fn from_str(s: &str) -> Result<WasmVersion, <WasmVersion as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Ord for WasmVersion
impl Ord for WasmVersion
Source§fn cmp(&self, other: &WasmVersion) -> Ordering
fn cmp(&self, other: &WasmVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WasmVersion
impl PartialEq for WasmVersion
Source§impl PartialOrd for WasmVersion
impl PartialOrd for WasmVersion
Source§impl Serialize for WasmVersion
impl Serialize for WasmVersion
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<u8> for WasmVersion
impl TryFrom<u8> for WasmVersion
Source§type Error = U8WasmVersionConvertError
type Error = U8WasmVersionConvertError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<WasmVersion, <WasmVersion as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<WasmVersion, <WasmVersion as TryFrom<u8>>::Error>
Performs the conversion.
impl Copy for WasmVersion
impl Eq for WasmVersion
impl StructuralPartialEq for WasmVersion
Auto Trait Implementations§
impl Freeze for WasmVersion
impl RefUnwindSafe for WasmVersion
impl Send for WasmVersion
impl Sync for WasmVersion
impl Unpin for WasmVersion
impl UnwindSafe for WasmVersion
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> 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
Compare self to
key and return true if they are equal.