#[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 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 WasmVersion
impl Debug for WasmVersion
source§impl Default for WasmVersion
impl Default for WasmVersion
V0 is the default version of smart contracts.
source§impl<'de> Deserialize<'de> for WasmVersion
impl<'de> Deserialize<'de> for WasmVersion
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 WasmVersion
impl Display for WasmVersion
source§impl From<WasmVersion> for u8
impl From<WasmVersion> for u8
source§fn from(x: WasmVersion) -> Self
fn from(x: WasmVersion) -> Self
Converts to this type from the input type.
source§impl FromStr for WasmVersion
impl FromStr for WasmVersion
source§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§fn eq(&self, other: &WasmVersion) -> bool
fn eq(&self, other: &WasmVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WasmVersion
impl PartialOrd for WasmVersion
source§fn partial_cmp(&self, other: &WasmVersion) -> Option<Ordering>
fn partial_cmp(&self, other: &WasmVersion) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for WasmVersion
impl Serialize for WasmVersion
source§impl TryFrom<u8> for WasmVersion
impl TryFrom<u8> for WasmVersion
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