pub trait UnsafeToRef {
type Guard: 'static;
// Required method
unsafe fn unsafe_to_ref<'a>(
value: Value,
) -> Result<(&'a Self, Self::Guard), RuntimeError>;
}Expand description
Unsafe to ref coercion.
Required Associated Types§
Required Methods§
Sourceunsafe fn unsafe_to_ref<'a>(
value: Value,
) -> Result<(&'a Self, Self::Guard), RuntimeError>
unsafe fn unsafe_to_ref<'a>( value: Value, ) -> Result<(&'a 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 UnsafeToRef for Error
Available on crate feature std only.
impl UnsafeToRef for Error
Available on crate feature
std only.type Guard = RawValueGuard
unsafe fn unsafe_to_ref<'a>( value: Value, ) -> Result<(&'a Self, Self::Guard), RuntimeError>
Source§impl UnsafeToRef for Error
Available on crate feature anyhow only.
impl UnsafeToRef for Error
Available on crate feature
anyhow only.