(&self)
| 427 | /// If this is a non-null `anyref`, then `Some(Some(..))` is returned. |
| 428 | #[inline] |
| 429 | pub fn anyref(&self) -> Option<Option<&Rooted<AnyRef>>> { |
| 430 | match self { |
| 431 | Val::AnyRef(None) => Some(None), |
| 432 | Val::AnyRef(Some(e)) => Some(Some(e)), |
| 433 | _ => None, |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | /// Returns the underlying `anyref` value of this `Val`, panicking if it's the |
| 438 | /// wrong type. |