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".
Implementations on Foreign Types§
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>
Source§impl UnsafeToMut for Error
Available on crate feature anyhow only.
impl UnsafeToMut for Error
Available on crate feature
anyhow only.