pub trait UnsafeFromValue: Sized {
type Guard;
// Required method
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm,
) -> Result<(Self, Self::Guard), StackError>;
}Expand description
A potentially unsafe conversion for value conversion.
Required Associated Types§
Required Methods§
Sourceunsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm,
) -> Result<(Self, Self::Guard), StackError>
unsafe fn unsafe_from_value( value: ValuePtr, vm: &mut Vm, ) -> Result<(Self, Self::Guard), StackError>
Convert the given reference using unsafe assumptions to a value.
§Safety
The return value of this function may only be used while a virtual machine is not being modified.
You must also make sure that the returned value 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.