pub fn ensure_number(&self) -> Result<f64, ErrorKind> {
      if self.0.kind() == ValueKind::Number {
         Ok(unsafe { *self.0.get_number_unchecked() })
      } else {
         Err(self.type_error("Number"))
      }
   }
/// Ensures the value is a `Number`, returning a type mismatch error if that's not the case.
Ensures the value is a `Number`, returning a type mismatch error if that's not the case.
Ensures the value is a ` Number ` returning a type mismatch error if that ' s not the case .
pub fn ensure_number(&self) -> Result<f64, ErrorKind> {
      if self.0.kind() == ValueKind::Number {
         Ok(unsafe { *self.0.get_number_unchecked() })
      } else {
         Err(self.type_error("Number"))
      }
   }
pub fn ensure_number ( & self ) -> Result < f64 , ErrorKind > { if self . 0 . kind ( ) == ValueKind :: Number { Ok ( unsafe { * self . 0 . get_number_unchecked ( ) } ) } else { Err ( self . type_error ( " " ) ) } }
Ensures the value is a `Number`, returning a type mismatch error if that's not the case.
Ensures the value is a ` Number ` returning a type mismatch error if that ' s not the case .
&self