pub struct Source {
generation: Cell<usize>,
list: PinCell<WakerList>,
}Expand description
Tracks the current generation, waking tasks that are awaiting associated Waiters when it increments.
Fields§
§generation: Cell<usize>§list: PinCell<WakerList>Implementations§
Source§impl Source
impl Source
pub(crate) fn new() -> Self
Sourcepub(crate) fn waiter(self: Pin<&Self>) -> Waiter<'_>
pub(crate) fn waiter(self: Pin<&Self>) -> Waiter<'_>
Returns a new waiter for this source.
§Panics
If called more times than the waiter_count provided on init.
Sourcepub(crate) fn increment_generation(self: Pin<&Self>)
pub(crate) fn increment_generation(self: Pin<&Self>)
fn link(self: Pin<&Self>, slot: Pin<&mut WakerSlot>, waker: Waker)
fn unlink(self: Pin<&Self>, slot: Pin<&mut WakerSlot>)
Trait Implementations§
impl<'pin> Unpin for Sourcewhere
PinnedFieldsOf<__Source<'pin>>: Unpin,
Auto Trait Implementations§
impl !Freeze for Source
impl !RefUnwindSafe for Source
impl Send for Source
impl !Sync for Source
impl UnwindSafe for Source
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more