diff --git a/types/src/predicates.rs b/types/src/preds.rs similarity index 79% rename from types/src/predicates.rs rename to types/src/preds.rs index 28e40cb..f10d347 100644 --- a/types/src/predicates.rs +++ b/types/src/preds.rs @@ -1,7 +1,10 @@ -/* types/src/predicates.rs +/* types/src/preds.rs * Eryn Wells */ +//! This module defines several important predicates for determing what kind of +//! a thing this Object is. + pub trait IsNull { /// Is this thing null? fn is_null(&self) -> bool { false } @@ -33,3 +36,8 @@ pub trait IsNumber { /// Should return `true` if this Value is a integer number type. fn is_integer(&self) -> bool { false } } + +pub trait IsPair { + /// Should return `true` if this Value is a pair. + fn is_pair(&self) -> bool { false } +}