(self: Pin<&mut Self>)
| 297 | |
| 298 | impl WasiStdinAsyncRead { |
| 299 | fn notified_future(self: Pin<&mut Self>) -> Option<Pin<&mut Notified<'static>>> { |
| 300 | // SAFETY: this is a pin-projection from `self` to the field `Notified` |
| 301 | // internally. Given that `self` is pinned it should be safe to acquire |
| 302 | // a pinned version of the internal field. |
| 303 | unsafe { |
| 304 | match self.get_unchecked_mut() { |
| 305 | WasiStdinAsyncRead::Ready => None, |
| 306 | WasiStdinAsyncRead::Waiting(notified) => Some(Pin::new_unchecked(notified)), |
| 307 | } |
| 308 | } |
| 309 | } |
| 310 | } |