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§
Required Methods§
Sourceunsafe fn unsafe_to_mut<'a>(
value: Value,
) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
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>
impl UnsafeToMut for Option<Value>
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for Result<Value, Value>
impl UnsafeToMut for Result<Value, Value>
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for str
impl UnsafeToMut for str
type Guard = RawAnyGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for Error
impl UnsafeToMut for Error
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for ParseCharError
impl UnsafeToMut for ParseCharError
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for Error
impl UnsafeToMut for Error
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for ParseFloatError
impl UnsafeToMut for ParseFloatError
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for ParseIntError
impl UnsafeToMut for ParseIntError
type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Source§impl UnsafeToMut for Utf8Error
impl UnsafeToMut for Utf8Error
type Guard = RawValueGuard
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.
impl UnsafeToMut for Error
Available on crate feature
std
only.type Guard = RawValueGuard
unsafe fn unsafe_to_mut<'a>( value: Value, ) -> Result<(&'a mut Self, Self::Guard), RuntimeError>
Implementors§
Source§impl UnsafeToMut for ControlFlow
impl UnsafeToMut for ControlFlow
type Guard = RawValueGuard
Source§impl UnsafeToMut for GeneratorState
impl UnsafeToMut for GeneratorState
type Guard = RawValueGuard
Source§impl UnsafeToMut for FromUtf8Error
Available on crate feature alloc
only.
impl UnsafeToMut for FromUtf8Error
Available on crate feature
alloc
only.