Add Dynamic::is_XXX API.
This commit is contained in:
@@ -99,6 +99,10 @@ impl Engine {
|
||||
///
|
||||
/// To define a pretty-print name, call [`with_name`][`TypeBuilder::with_name`],
|
||||
/// to use [`Engine::register_type_with_name`] instead.
|
||||
///
|
||||
/// # WARNING - Volatile Type
|
||||
///
|
||||
/// This type is volatile and may change in the future.
|
||||
#[deprecated = "This type is NOT deprecated, but it is considered volatile and may change in the future."]
|
||||
pub struct TypeBuilder<'a, T: Variant + Clone> {
|
||||
engine: &'a mut Engine,
|
||||
|
@@ -89,6 +89,7 @@ impl Expression<'_> {
|
||||
/// # WARNING - Low Level API
|
||||
///
|
||||
/// This function is _extremely_ low level. It evaluates an expression from an [`AST`][crate::AST].
|
||||
#[deprecated = "This API is NOT deprecated, but it is considered volatile and may change in the future."]
|
||||
#[inline(always)]
|
||||
pub fn eval_with_context_raw(
|
||||
&self,
|
||||
|
@@ -166,7 +166,7 @@ pub fn format_map_as_json(map: &Map) -> String {
|
||||
|
||||
if let Some(val) = value.read_lock::<Map>() {
|
||||
result.push_str(&format_map_as_json(&*val));
|
||||
} else if value.is::<()>() {
|
||||
} else if value.is_unit() {
|
||||
result.push_str("null");
|
||||
} else {
|
||||
write!(result, "{:?}", value).unwrap();
|
||||
|
Reference in New Issue
Block a user