impl is_null
@@ -320,6 +320,12 @@ impl Value {
}
}
+ /// same is nil
+ #[inline]
+ pub fn is_null(&self) -> bool {
+ self.is_nil()
+ }
+
/// Returns true if the `Value` is a Boolean. Returns false otherwise.
///
/// # Examples
@@ -1151,6 +1157,16 @@ impl<'a> ValueRef<'a> {
None
}
}
+
+ /// same is nil
+ #[inline]
+ pub fn is_null(&self) -> bool {
+ if self.eq(&ValueRef::Nil){
+ true
+ }else{
+ false
+ }
+ }
}
impl<'a> From<u8> for ValueRef<'a> {
