Trait rune::runtime::UnsafeToRef

source ·
pub trait UnsafeToRef {
    type Guard: 'static;

    // Required method
    unsafe fn unsafe_to_ref<'a>(
        value: Value
    ) -> VmResult<(&'a Self, Self::Guard)>;
}
Expand description

Unsafe to ref coercion.

Required Associated Types§

source

type Guard: 'static

The raw guard returned.

Must only be dropped after the value returned from this function is no longer live.

Required Methods§

source

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

§Safety

Caller must ensure that the returned reference does not outlive the guard.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl UnsafeToRef for Option<Value>

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for Result<Value, Value>

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for str

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for ParseCharError

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for Error

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for ParseFloatError

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for ParseIntError

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for Utf8Error

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for Error

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for Error

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for [Value]

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

source§

impl UnsafeToRef for [u8]

§

type Guard = RawRef

source§

unsafe fn unsafe_to_ref<'a>(value: Value) -> VmResult<(&'a Self, Self::Guard)>

Implementors§