rune::runtime

Trait ToReturn

Source
pub trait ToReturn: Sized {
    // Required method
    fn to_return(self) -> VmResult<Value>;
}
Expand description

Trait governing things that can be returned from native functions.

Required Methods§

Source

fn to_return(self) -> VmResult<Value>

Convert something into a return value.

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.

Implementors§

Source§

impl<T> ToReturn for VmResult<T>
where T: ToValue,

Source§

impl<T> ToReturn for T
where T: ToValue,