rust_dynamic/
checker.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::value::Value;
use crate::types::*;

impl Value {
    pub fn is_type(&self, t: u16) -> bool {
        self.dt == t
    }
    pub fn is_none(&self) -> bool {
        self.is_type(NONE)
    }
    pub fn is_json(&self) -> bool {
        self.is_type(JSON)
    }
}