Add additional convenience functions on Value type

This commit is contained in:
Tobie Morgan Hitchcock 2022-09-22 16:58:59 +01:00
parent b31dbb28fe
commit 26de0b5c46

View file

@ -535,6 +535,14 @@ impl Value {
matches!(self, Value::Thing(_))
}
pub fn is_model(&self) -> bool {
matches!(self, Value::Model(_))
}
pub fn is_range(&self) -> bool {
matches!(self, Value::Range(_))
}
pub fn is_strand(&self) -> bool {
matches!(self, Value::Strand(_))
}