pub struct PollRegistrar<M> { /* private fields */ }Expand description
Owns every readiness registration made by one polling attempt.
Dropping or resetting a registrar cancels every still-live source lease.
Implementations§
Source§impl<M> PollRegistrar<M>
impl<M> PollRegistrar<M>
Sourcepub unsafe fn register(&mut self, source: &dyn PollSource, interests: IoEvents)
pub unsafe fn register(&mut self, source: &dyn PollSource, interests: IoEvents)
Registers this observer in source for interests.
§Safety
Registration is task/deferred-context only.
Source§impl PollRegistrar<ExclusiveConsumer>
impl PollRegistrar<ExclusiveConsumer>
Sourcepub fn was_exclusively_notified(&self) -> bool
pub fn was_exclusively_notified(&self) -> bool
Returns whether an exclusive source selected this polling attempt.
Consumptive sources use this to transfer still-available readiness to the next exclusive waiter without turning ordinary wakeups into a broadcast.
Sourcepub unsafe fn register_exclusive(
&mut self,
source: &dyn PollSource,
interests: IoEvents,
)
pub unsafe fn register_exclusive( &mut self, source: &dyn PollSource, interests: IoEvents, )
Registers this consumer as a shared observer at a composite boundary.
§Safety
Registration is task/deferred-context only.
Trait Implementations§
Source§impl ExclusiveRegistrationSink for PollRegistrar<ExclusiveConsumer>
impl ExclusiveRegistrationSink for PollRegistrar<ExclusiveConsumer>
Source§unsafe fn register_exclusive(
&mut self,
source: &dyn PollSource,
interests: IoEvents,
)
unsafe fn register_exclusive( &mut self, source: &dyn PollSource, interests: IoEvents, )
Adds an exclusive registration owned by this sink. Read more
Borrows this sink’s shared-registration capability.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for PollRegistrar<M>
impl<M> !Sync for PollRegistrar<M>
impl<M> !UnwindSafe for PollRegistrar<M>
impl<M> Freeze for PollRegistrar<M>
impl<M> Send for PollRegistrar<M>
impl<M> Unpin for PollRegistrar<M>
impl<M> UnsafeUnpin for PollRegistrar<M>
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