pub struct AsyncPoll { /* private fields */ }
Available on crate features
unix
and poll-driver
only.Expand description
An unsafe asynchronous poller around a pollfd
.
See AsyncPoll::new.
Implementations§
Source§impl AsyncPoll
impl AsyncPoll
Sourcepub unsafe fn new(descriptor: pollfd) -> Result<AsyncPoll, Errno>
pub unsafe fn new(descriptor: pollfd) -> Result<AsyncPoll, Errno>
Construct a new poll handle around the given pollfd
, registering it
for interest in receiving events asynchronously.
Dropping the returned handle will unregister interest.
§Panics
Panics unless an audio runtime is available.
See Runtime.
§Safety
This is unsafe, because the caller must ensure that the provided
pollfd
is not closed before this handle is dropped.
Sourcepub async fn returned_events(&self) -> PollEventsGuard<'_>
pub async fn returned_events(&self) -> PollEventsGuard<'_>
Wait for events to be triggered on the background driver and return a guard to the events.
Once this guard is dropped the driver will be released to register more interest.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsyncPoll
impl !RefUnwindSafe for AsyncPoll
impl Send for AsyncPoll
impl Sync for AsyncPoll
impl Unpin for AsyncPoll
impl !UnwindSafe for AsyncPoll
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