Trait Cont

Source
pub trait Cont:
    Store
    + SafeDelete
    + DynClone
    + Debug {
    // Required methods
    fn rc_into_dyn(self: Rc<Self>) -> Rc<dyn StackValue>;
    fn as_stack_value(&self) -> &dyn StackValue;
    fn fmt(&self, f: &mut Formatter<'_>) -> Result;
    fn jump(
        self: Rc<Self>,
        state: &mut VmState<'_>,
        exit_code: &mut i32,
    ) -> VmResult<Option<RcCont>>;

    // Provided methods
    fn get_control_data(&self) -> Option<&ControlData> { ... }
    fn get_control_data_mut(&mut self) -> Option<&mut ControlData> { ... }
}
Expand description

Continuation interface.

Required Methods§

Source

fn rc_into_dyn(self: Rc<Self>) -> Rc<dyn StackValue>

Source

fn as_stack_value(&self) -> &dyn StackValue

Source

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Source

fn jump( self: Rc<Self>, state: &mut VmState<'_>, exit_code: &mut i32, ) -> VmResult<Option<RcCont>>

Provided Methods§

Implementations§

Source§

impl dyn Cont

Source

pub fn has_c0(&self) -> bool

Trait Implementations§

Source§

impl SafeRcMakeMut for dyn Cont

Source§

fn rc_make_mut(rc: &mut Rc<Self>) -> &mut Self

Source§

impl StackValue for dyn Cont

Source§

impl StaticStackValue for dyn Cont

Source§

type DynRef<'a> = &'a (dyn Cont + 'static)

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§