pub struct ClockState {
pub waiting: RefCell<Vec<Vec<TaskWaker>>>,
pub waiting_times: RefCell<Vec<ClockTick>>,
pub to_resolve: RefCell<Vec<Rc<dyn Resolve + 'static>>>,
/* private fields */
}Expand description
Shared state between futures using a Clock and the Clock itself.
Fields§
§waiting: RefCell<Vec<Vec<TaskWaker>>>Queue of futures waiting for the right time.
waiting_times: RefCell<Vec<ClockTick>>Queue of times at which those futures are to be woken. This is kept sorted by time so that the first entry is the next to be woken.
to_resolve: RefCell<Vec<Rc<dyn Resolve + 'static>>>Registered Resolve functions.
Auto Trait Implementations§
impl !Freeze for ClockState
impl !RefUnwindSafe for ClockState
impl !Send for ClockState
impl !Sync for ClockState
impl Unpin for ClockState
impl !UnwindSafe for ClockState
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