Trait UnsafeToMut

Source
pub trait UnsafeToMut {
    type Guard: 'static;

    // Required method
    unsafe fn unsafe_to_mut<'a>(
        value: Value,
    ) -> VmResult<(&'a mut Self, Self::Guard)>;
}
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, ) -> VmResult<(&'a mut Self, Self::Guard)>

§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 = RawMut

Source§

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

Source§

impl UnsafeToMut for Result<Value, Value>

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for str

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for ParseCharError

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for Error

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for ParseFloatError

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for ParseIntError

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for Utf8Error

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for Error

Source§

type Guard = RawMut

Source§

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

Source§

impl UnsafeToMut for Error

Source§

type Guard = RawMut

Source§

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

Implementors§