[−][src]Trait stk::UnsafeFromValue
A potentially unsafe conversion for value conversion.
Associated Types
type Guard
The raw guard returned.
Must only be dropped after the value returned from this function is no longer live.
Required methods
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
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.
Implementations on Foreign Types
impl<'a> UnsafeFromValue for &'a [u8]
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a str
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a String
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a mut String
[src]
type Guard = RawMutGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
Implementors
impl<'a> UnsafeFromValue for &'a Bytes
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a Array<ValuePtr>
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a Object<ValuePtr>
[src]
type Guard = RawRefGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<'a> UnsafeFromValue for &'a mut Bytes
[src]
type Guard = RawMutGuard
unsafe fn unsafe_from_value(
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
[src]
value: ValuePtr,
vm: &mut Vm
) -> Result<(Self, Self::Guard), StackError>
impl<T> UnsafeFromValue for T where
T: FromValue,
[src]
T: FromValue,