diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-01 16:08:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-01 16:08:02 +0100 |
| commit | a643e5980052153bdb7a8271b68bd28a2bd06126 (patch) | |
| tree | 5700a59ff507bca6140e43a8b61cdcd5fda8cd30 /library/std/src/sys/unix/process/process_unix.rs | |
| parent | ce6c1484f8963cee8b793f010ad84ef7e94d2b91 (diff) | |
| parent | bae0da83612257185691faf94fc39457b4ed14e6 (diff) | |
| download | rust-a643e5980052153bdb7a8271b68bd28a2bd06126.tar.gz rust-a643e5980052153bdb7a8271b68bd28a2bd06126.zip | |
Rollup merge of #91828 - oxalica:feat/waker-getters, r=dtolnay
Implement `RawWaker` and `Waker` getters for underlying pointers implement #87021 New APIs: - `RawWaker::data(&self) -> *const ()` - `RawWaker::vtable(&self) -> &'static RawWakerVTable` - ~`Waker::as_raw_waker(&self) -> &RawWaker`~ `Waker::as_raw(&self) -> &RawWaker` This third one is an auxiliary function to make the two APIs above more useful. Since we can only get `&Waker` in `Future::poll`, without this, we need to `transmute` it into `&RawWaker` (relying on `repr(transparent)`) in order to access its data/vtable pointers. ~Not sure if it should be named `as_raw` or `as_raw_waker`. Seems we always use `as_<something-raw>` instead of just `as_raw`. But `as_raw_waker` seems not quite consistent with `Waker::from_raw`.~ As suggested in https://github.com/rust-lang/rust/pull/91828#discussion_r770729837, use `as_raw`.
Diffstat (limited to 'library/std/src/sys/unix/process/process_unix.rs')
0 files changed, 0 insertions, 0 deletions
