(&self)
| 241 | } |
| 242 | |
| 243 | pub fn is_error(&self) -> bool { |
| 244 | match self { |
| 245 | // Check instance of error class (NetworkError!) |
| 246 | Value::Instance(instance) => instance.borrow().class.borrow().is_error_type(), |
| 247 | // Check enum variant from error enum (IOError!::ReadError) |
| 248 | Value::EnumVariant(variant) => variant.enum_.borrow().is_error_type(), |
| 249 | _ => false, |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | pub fn is_object(&self) -> bool { |
| 254 | matches!(self, Value::Object(_)) |
no test coverage detected