rune::runtime

Trait UnsafeToMut

Source
pub trait UnsafeToMut {
    type Guard: 'static;

    // Required method
    unsafe fn unsafe_to_mut<'a>(
        value: Value,
    ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>;
}
Expand description

Unsafe to mut 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_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

§Safety

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

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 UnsafeToMut for Option<Value>

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for Result<Value, Value>

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for str

Source§

type Guard = RawAnyGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for Error

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for ParseCharError

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for Error

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for ParseFloatError

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for ParseIntError

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for Utf8Error

Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Source§

impl UnsafeToMut for Error

Available on crate feature std only.
Source§

type Guard = RawValueGuard

Source§

unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>

Implementors§

Source§

impl UnsafeToMut for ControlFlow

Source§

impl UnsafeToMut for GeneratorState

Source§

impl UnsafeToMut for FromUtf8Error

Available on crate feature alloc only.
Source§

impl UnsafeToMut for String

Source§

impl UnsafeToMut for Bencher

Source§

impl UnsafeToMut for Format

Source§

impl UnsafeToMut for Bytes

Source§

impl UnsafeToMut for Formatter

Source§

impl UnsafeToMut for Function

Source§

impl UnsafeToMut for Future

Source§

impl UnsafeToMut for Generator<Vm>

Source§

impl UnsafeToMut for Hasher

Source§

impl UnsafeToMut for Object

Source§

impl UnsafeToMut for OwnedTuple

Source§

impl UnsafeToMut for Range

Source§

impl UnsafeToMut for RangeFrom

Source§

impl UnsafeToMut for RangeFull

Source§

impl UnsafeToMut for RangeInclusive

Source§

impl UnsafeToMut for RangeTo

Source§

impl UnsafeToMut for RangeToInclusive

Source§

impl UnsafeToMut for Stream<Vm>

Source§

impl UnsafeToMut for Tuple

Source§

impl UnsafeToMut for Vec