Enum ckb_script::ScriptVersion
source · pub enum ScriptVersion {
V0,
V1,
}
Expand description
The version of CKB Script Verifier.
Variants§
Implementations§
source§impl ScriptVersion
impl ScriptVersion
sourcepub fn vm_version(self) -> VmVersion
pub fn vm_version(self) -> VmVersion
Returns the version of CKB VM in current script version.
sourcepub fn data_hash_type(self) -> ScriptHashType
pub fn data_hash_type(self) -> ScriptHashType
Returns the specific data script hash type.
Returns:
ScriptHashType::Data
for version 0;ScriptHashType::Data1
for version 1;
sourcepub fn init_core_machine_without_limit(self) -> CoreMachine
pub fn init_core_machine_without_limit(self) -> CoreMachine
Creates a CKB VM core machine without cycles limit.
In fact, there is still a limit of max_cycles
which is set to 2^64-1
.
sourcepub fn init_core_machine(self, max_cycles: Cycle) -> CoreMachine
pub fn init_core_machine(self, max_cycles: Cycle) -> CoreMachine
Creates a CKB VM core machine.
Trait Implementations§
source§impl Clone for ScriptVersion
impl Clone for ScriptVersion
source§fn clone(&self) -> ScriptVersion
fn clone(&self) -> ScriptVersion
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 ScriptVersion
impl Debug for ScriptVersion
source§impl Ord for ScriptVersion
impl Ord for ScriptVersion
source§fn cmp(&self, other: &ScriptVersion) -> Ordering
fn cmp(&self, other: &ScriptVersion) -> 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<ScriptVersion> for ScriptVersion
impl PartialEq<ScriptVersion> for ScriptVersion
source§fn eq(&self, other: &ScriptVersion) -> bool
fn eq(&self, other: &ScriptVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ScriptVersion> for ScriptVersion
impl PartialOrd<ScriptVersion> for ScriptVersion
source§fn partial_cmp(&self, other: &ScriptVersion) -> Option<Ordering>
fn partial_cmp(&self, other: &ScriptVersion) -> 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 more