rune::runtime

Trait UnsafeToValue

Source
pub trait UnsafeToValue: Sized {
    type Guard: 'static;

    // Required method
    unsafe fn unsafe_to_value(
        self,
    ) -> Result<(Value, Self::Guard), RuntimeError>;
}
Expand description

Trait for converting types into values.

Required Associated Types§

Source

type Guard: 'static

The type used to guard the unsafe value conversion.

Required Methods§

Source

unsafe fn unsafe_to_value(self) -> Result<(Value, Self::Guard), RuntimeError>

Convert into a value.

§Safety

The value returned must not be used after the guard associated with it has been dropped.

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 UnsafeToValue for &Option<Value>

Source§

impl UnsafeToValue for &Result<Value, Value>

Source§

impl UnsafeToValue for &Error

Source§

impl UnsafeToValue for &ParseCharError

Source§

impl UnsafeToValue for &Error

Source§

impl UnsafeToValue for &ParseFloatError

Source§

impl UnsafeToValue for &ParseIntError

Source§

impl UnsafeToValue for &Utf8Error

Source§

impl UnsafeToValue for &Error

Available on crate feature std only.
Source§

impl UnsafeToValue for &mut Option<Value>

Source§

impl UnsafeToValue for &mut Result<Value, Value>

Source§

impl UnsafeToValue for &mut Error

Source§

impl UnsafeToValue for &mut ParseCharError

Source§

impl UnsafeToValue for &mut Error

Source§

impl UnsafeToValue for &mut ParseFloatError

Source§

impl UnsafeToValue for &mut ParseIntError

Source§

impl UnsafeToValue for &mut Utf8Error

Source§

impl UnsafeToValue for &mut Error

Available on crate feature std only.

Implementors§

Source§

impl UnsafeToValue for &ControlFlow

Source§

impl UnsafeToValue for &GeneratorState

Source§

impl UnsafeToValue for &FromUtf8Error

Available on crate feature alloc only.
Source§

impl UnsafeToValue for &String

Source§

impl UnsafeToValue for &Bencher

Source§

impl UnsafeToValue for &Format

Source§

impl UnsafeToValue for &Bytes

Source§

impl UnsafeToValue for &Formatter

Source§

impl UnsafeToValue for &Function

Source§

impl UnsafeToValue for &Future

Source§

impl UnsafeToValue for &Generator<Vm>

Source§

impl UnsafeToValue for &Hasher

Source§

impl UnsafeToValue for &Object

Source§

impl UnsafeToValue for &OwnedTuple

Source§

impl UnsafeToValue for &Range

Source§

impl UnsafeToValue for &RangeFrom

Source§

impl UnsafeToValue for &RangeFull

Source§

impl UnsafeToValue for &RangeInclusive

Source§

impl UnsafeToValue for &RangeTo

Source§

impl UnsafeToValue for &RangeToInclusive

Source§

impl UnsafeToValue for &Stream<Vm>

Source§

impl UnsafeToValue for &Vec

Source§

impl UnsafeToValue for &mut ControlFlow

Source§

impl UnsafeToValue for &mut GeneratorState

Source§

impl UnsafeToValue for &mut FromUtf8Error

Available on crate feature alloc only.
Source§

impl UnsafeToValue for &mut String

Source§

impl UnsafeToValue for &mut Bencher

Source§

impl UnsafeToValue for &mut Format

Source§

impl UnsafeToValue for &mut Bytes

Source§

impl UnsafeToValue for &mut Formatter

Source§

impl UnsafeToValue for &mut Function

Source§

impl UnsafeToValue for &mut Future

Source§

impl UnsafeToValue for &mut Generator<Vm>

Source§

impl UnsafeToValue for &mut Hasher

Source§

impl UnsafeToValue for &mut Object

Source§

impl UnsafeToValue for &mut OwnedTuple

Source§

impl UnsafeToValue for &mut Range

Source§

impl UnsafeToValue for &mut RangeFrom

Source§

impl UnsafeToValue for &mut RangeFull

Source§

impl UnsafeToValue for &mut RangeInclusive

Source§

impl UnsafeToValue for &mut RangeTo

Source§

impl UnsafeToValue for &mut RangeToInclusive

Source§

impl UnsafeToValue for &mut Stream<Vm>

Source§

impl UnsafeToValue for &mut Vec

Source§

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