Trait fn_vm::VMValue

source ·
pub trait VMValue<T: VMValue<T> + Clone + Default + PartialEq> {
    // Required methods
    fn to_bytes(&self) -> Vec<u8>;
    fn from_bytes(vm: &mut VM<T>) -> T;
}

Required Methods§

source

fn to_bytes(&self) -> Vec<u8>

source

fn from_bytes(vm: &mut VM<T>) -> T

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VMValue<Length> for Length

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<Length>) -> Length

source§

impl VMValue<bool> for bool

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<bool>) -> bool

source§

impl VMValue<f32> for f32

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<f32>) -> f32

source§

impl VMValue<f64> for f64

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<f64>) -> f64

source§

impl VMValue<i8> for i8

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<i8>) -> i8

source§

impl VMValue<i16> for i16

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<i16>) -> i16

source§

impl VMValue<i32> for i32

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<i32>) -> i32

source§

impl VMValue<i64> for i64

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<i64>) -> i64

source§

impl VMValue<i128> for i128

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<i128>) -> i128

source§

impl VMValue<u8> for u8

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<u8>) -> u8

source§

impl VMValue<u16> for u16

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<u16>) -> u16

source§

impl VMValue<u32> for u32

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<u32>) -> u32

source§

impl VMValue<u64> for u64

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<u64>) -> u64

source§

impl VMValue<u128> for u128

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<u128>) -> u128

source§

impl VMValue<String> for String

source§

fn to_bytes(&self) -> Vec<u8>

source§

fn from_bytes(vm: &mut VM<String>) -> String

Implementors§