pub(crate) fn from_raw(raw: RawValue) -> Self {
      unsafe {
         match raw.kind() {
            ValueKind::Nil => Self::from(()),
            ValueKind::Boolean => Self::from(raw.get_boolean_unchecked()),
            ValueKind::Number => Self::from(*raw.get_number_unchecked()),
            ValueKind::String => Self::from(Gc::from_raw(raw.get_raw_string_unchecked())),
            ValueKind::Function => {
               Self::Function(Hidden(Gc::from_raw(raw.get_raw_function_unchecked())))
            }
            ValueKind::Struct => Self::Struct(Hidden(Gc::from_raw(raw.get_raw_struct_unchecked()))),
            ValueKind::List => Self::List(Hidden(Gc::from_raw(raw.get_raw_list_unchecked()))),
            ValueKind::UserData => Self::UserData(Gc::from_raw(raw.get_raw_user_data_unchecked())),
         }
      }
   }
/// Converts a raw value into a safe value.
Converts a raw value into a safe value.
Converts a raw value into a safe value .
pub(crate) fn from_raw(raw: RawValue) -> Self {
      unsafe {
         match raw.kind() {
            ValueKind::Nil => Self::from(()),
            ValueKind::Boolean => Self::from(raw.get_boolean_unchecked()),
            ValueKind::Number => Self::from(*raw.get_number_unchecked()),
            ValueKind::String => Self::from(Gc::from_raw(raw.get_raw_string_unchecked())),
            ValueKind::Function => {
               Self::Function(Hidden(Gc::from_raw(raw.get_raw_function_unchecked())))
            }
            ValueKind::Struct => Self::Struct(Hidden(Gc::from_raw(raw.get_raw_struct_unchecked()))),
            ValueKind::List => Self::List(Hidden(Gc::from_raw(raw.get_raw_list_unchecked()))),
            ValueKind::UserData => Self::UserData(Gc::from_raw(raw.get_raw_user_data_unchecked())),
         }
      }
   }
pub ( crate ) fn from_raw ( raw : RawValue ) -> Self { unsafe { match raw . kind ( ) { ValueKind :: Nil => Self :: from ( ( ) ) , ValueKind :: Boolean => Self :: from ( raw . get_boolean_unchecked ( ) ) , ValueKind :: Number => Self :: from ( * raw . get_number_unchecked ( ) ) , ValueKind :: String => Self :: from ( Gc :: from_raw ( raw . get_raw_string_unchecked ( ) ) ) , ValueKind :: Function => { Self :: Function ( Hidden ( Gc :: from_raw ( raw . get_raw_function_unchecked ( ) ) ) ) } ValueKind :: Struct => Self :: Struct ( Hidden ( Gc :: from_raw ( raw . get_raw_struct_unchecked ( ) ) ) ) , ValueKind :: List => Self :: List ( Hidden ( Gc :: from_raw ( raw . get_raw_list_unchecked ( ) ) ) ) , ValueKind :: UserData => Self :: UserData ( Gc :: from_raw ( raw . get_raw_user_data_unchecked ( ) ) ) , } } }
Converts a raw value into a safe value.
Converts a raw value into a safe value .
raw
RawValue