pub fn new(value: Value) -> VMResult<Self> {
        match value.0 {
            ValueImpl::Reference(reference) => Ok(ReferenceValue::Reference(reference)),
            ValueImpl::GlobalRef(reference) => Ok(ReferenceValue::GlobalRef(reference)),
            _ => Err(VMStatus::new(StatusCode::INTERNAL_TYPE_ERROR)),
        }
    }
/// Create a `ReferenceValue` from a `Value` popped off the stack.
/// Fails if the value is not a reference of some kind.
Create a `ReferenceValue` from a `Value` popped off the stack.
Fails if the value is not a reference of some kind.
Create a ` ReferenceValue ` from a ` Value ` popped off the stack . Fails if the value is not a reference of some kind .
pub fn new(value: Value) -> VMResult<Self> {
        match value.0 {
            ValueImpl::Reference(reference) => Ok(ReferenceValue::Reference(reference)),
            ValueImpl::GlobalRef(reference) => Ok(ReferenceValue::GlobalRef(reference)),
            _ => Err(VMStatus::new(StatusCode::INTERNAL_TYPE_ERROR)),
        }
    }
pub fn new ( value : Value ) -> VMResult < Self > { match value . 0 { ValueImpl :: Reference ( reference ) => Ok ( ReferenceValue :: Reference ( reference ) ) , ValueImpl :: GlobalRef ( reference ) => Ok ( ReferenceValue :: GlobalRef ( reference ) ) , _ => Err ( VMStatus :: new ( StatusCode :: INTERNAL_TYPE_ERROR ) ) , } }
Create a `ReferenceValue` from a `Value` popped off the stack.
Create a ` ReferenceValue ` from a ` Value ` popped off the stack .
value
Value