Struct tokio::util::idle_notified_set::IdleNotifiedSet
source · pub(crate) struct IdleNotifiedSet<T> {
lists: Arc<Mutex<ListsInner<T>>>,
length: usize,
}
Expand description
This is the main handle to the collection.
Fields§
§lists: Arc<Mutex<ListsInner<T>>>
§length: usize
Implementations§
source§impl<T> IdleNotifiedSet<T>
impl<T> IdleNotifiedSet<T>
pub(crate) fn len(&self) -> usize
pub(crate) fn is_empty(&self) -> bool
sourcepub(crate) fn insert_idle(&mut self, value: T) -> EntryInOneOfTheLists<'_, T>
pub(crate) fn insert_idle(&mut self, value: T) -> EntryInOneOfTheLists<'_, T>
Insert the given value into the idle
list.
sourcepub(crate) fn pop_notified(
&mut self,
waker: &Waker,
) -> Option<EntryInOneOfTheLists<'_, T>>
pub(crate) fn pop_notified( &mut self, waker: &Waker, ) -> Option<EntryInOneOfTheLists<'_, T>>
Pop an entry from the notified list to poll it. The entry is moved to the idle list atomically.
sourcepub(crate) fn try_pop_notified(&mut self) -> Option<EntryInOneOfTheLists<'_, T>>
pub(crate) fn try_pop_notified(&mut self) -> Option<EntryInOneOfTheLists<'_, T>>
Tries to pop an entry from the notified list to poll it. The entry is moved to the idle list atomically.
Trait Implementations§
source§impl<T> Drop for IdleNotifiedSet<T>
impl<T> Drop for IdleNotifiedSet<T>
impl<T: Send> Send for IdleNotifiedSet<T>
impl<T: Sync> Sync for IdleNotifiedSet<T>
Auto Trait Implementations§
impl<T> Freeze for IdleNotifiedSet<T>
impl<T> RefUnwindSafe for IdleNotifiedSet<T>
impl<T> Unpin for IdleNotifiedSet<T>
impl<T> UnwindSafe for IdleNotifiedSet<T>
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