Enum ckb_script::ScriptVersion
source · [−]pub enum ScriptVersion {
V0,
V1,
}
Expand description
The version of CKB Script Verifier.
Variants
V0
CKB VM 0 with Syscall version 1.
V1
CKB VM 1 with Syscall version 1 and version 2.
Implementations
sourceimpl 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
sourceimpl Clone for ScriptVersion
impl Clone for ScriptVersion
sourcefn clone(&self) -> ScriptVersion
fn clone(&self) -> ScriptVersion
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ScriptVersion
impl Debug for ScriptVersion
sourceimpl Ord for ScriptVersion
impl Ord for ScriptVersion
sourceimpl PartialEq<ScriptVersion> for ScriptVersion
impl PartialEq<ScriptVersion> for ScriptVersion
sourceimpl PartialOrd<ScriptVersion> for ScriptVersion
impl PartialOrd<ScriptVersion> for ScriptVersion
sourcefn partial_cmp(&self, other: &ScriptVersion) -> Option<Ordering>
fn partial_cmp(&self, other: &ScriptVersion) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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
impl Copy for ScriptVersion
impl Eq for ScriptVersion
impl StructuralEq for ScriptVersion
impl StructuralPartialEq for ScriptVersion
Auto Trait Implementations
impl RefUnwindSafe for ScriptVersion
impl Send for ScriptVersion
impl Sync for ScriptVersion
impl Unpin for ScriptVersion
impl UnwindSafe for ScriptVersion
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more