(self)
| 216 | } |
| 217 | |
| 218 | pub fn as_array(self) -> Result<GcRefLock<'gc, List<'gc>>, VmError> { |
| 219 | match self { |
| 220 | Value::List(list) => Ok(list), |
| 221 | v => Err(VmError::RuntimeError(format!( |
| 222 | "cannot convert to array, the value is {v}" |
| 223 | ))), |
| 224 | } |
| 225 | } |
| 226 | |
| 227 | pub fn as_agent(self) -> Result<Gc<'gc, Agent<'gc>>, VmError> { |
| 228 | match self { |
no test coverage detected