Add additional convenience functions on Value type
This commit is contained in:
parent
b31dbb28fe
commit
26de0b5c46
1 changed files with 8 additions and 0 deletions
|
@ -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(_))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue