1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use crate::support;
extern "C" {
fn v8__Value__IsUndefined(this: &Value) -> bool;
fn v8__Value__IsNull(this: &Value) -> bool;
fn v8__Value__IsNullOrUndefined(this: &Value) -> bool;
}
#[repr(C)]
pub struct Value(support::Opaque);
impl Value {
pub fn is_undefined(&self) -> bool {
unsafe { v8__Value__IsUndefined(self) }
}
pub fn is_null(&self) -> bool {
unsafe { v8__Value__IsNull(self) }
}
pub fn is_null_or_undefined(&self) -> bool {
unsafe { v8__Value__IsNullOrUndefined(self) }
}
}