This commit is contained in:
Jeff 2024-08-28 12:06:25 -04:00
parent b02e5244f2
commit 0c3e8d5edf

View File

@ -167,10 +167,15 @@ impl Value {
} }
pub fn is_raw(&self) -> bool { pub fn is_raw(&self) -> bool {
match self { matches!(self, Value::Raw(_))
Value::Raw(_) => true, }
_ => false,
} pub fn is_reference(&self) -> bool {
matches!(self, Value::Reference(_))
}
pub fn is_mutable(&self) -> bool {
matches!(self, Value::Mutable(_))
} }
pub fn as_mutable(&self) -> Option<&Arc<RwLock<ValueData>>> { pub fn as_mutable(&self) -> Option<&Arc<RwLock<ValueData>>> {