(&self)
| 1705 | } |
| 1706 | |
| 1707 | fn source(&self) -> Option<&Error> { |
| 1708 | match self.unpack() { |
| 1709 | OomOrDynErrorRef::DynError(e) => { |
| 1710 | // Safety: invariant of this type. |
| 1711 | let vtable = unsafe { e.as_ref().vtable }; |
| 1712 | // Safety: using the vtable associated with this pointer's |
| 1713 | // concrete type and the pointer is valid. |
| 1714 | unsafe { (vtable.source)(e) } |
| 1715 | } |
| 1716 | OomOrDynErrorRef::Oom(_) => None, |
| 1717 | } |
| 1718 | } |
| 1719 | |
| 1720 | fn source_mut(&mut self) -> Option<&mut Error> { |
| 1721 | match self.unpack_mut() { |