Trait StaticStackValue

Source
pub trait StaticStackValue: StackValue {
    type DynRef<'a>;

    // Required methods
    fn known_ty() -> StackValueType;
    fn from_dyn(value: Rc<dyn StackValue>) -> VmResult<Rc<Self>>;
    fn from_dyn_ref(value: &dyn StackValue) -> VmResult<Self::DynRef<'_>>;
}
Expand description

Static-dispatch type extension for StackValue.

Required Associated Types§

Source

type DynRef<'a>

Required Methods§

Source

fn known_ty() -> StackValueType

Source

fn from_dyn(value: Rc<dyn StackValue>) -> VmResult<Rc<Self>>

Source

fn from_dyn_ref(value: &dyn StackValue) -> VmResult<Self::DynRef<'_>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl StaticStackValue for BigInt

Source§

type DynRef<'a> = &'a BigInt

Source§

fn known_ty() -> StackValueType

Source§

fn from_dyn(value: Rc<dyn StackValue>) -> VmResult<Rc<Self>>

Source§

fn from_dyn_ref(value: &dyn StackValue) -> VmResult<Self::DynRef<'_>>

Source§

impl StaticStackValue for CellBuilder

Source§

impl StaticStackValue for Cell

Source§

type DynRef<'a> = &'a Cell

Source§

fn known_ty() -> StackValueType

Source§

fn from_dyn(value: Rc<dyn StackValue>) -> VmResult<Rc<Self>>

Source§

fn from_dyn_ref(value: &dyn StackValue) -> VmResult<Self::DynRef<'_>>

Implementors§