Skip to main content

Poll

Trait Poll 

Source
pub trait Poll {
    type Context;
    type Error: Copy + Eq;

    // Required methods
    unsafe fn commit<'a, Q: Quota>(
        &'a mut self,
        quota: Q,
        deferred: impl FnOnce() -> bool,
    ) -> Result<Poll<()>, Self::Error>
       where Self::Context: 'a;
    unsafe fn wait<'a, Q: Quota>(
        &'a mut self,
        quota: Q,
        timeout: Option<Duration>,
        busy: impl FnOnce() -> bool,
    ) -> Result<(), Self::Error>
       where Self::Context: 'a;
}
Expand description

Commits and waits while the host retains the registered operation owners.

Required Associated Types§

Required Methods§

Source

unsafe fn commit<'a, Q: Quota>( &'a mut self, quota: Q, deferred: impl FnOnce() -> bool, ) -> Result<Poll<()>, Self::Error>
where Self::Context: 'a,

§Safety

Registered storage and kernel identities remain valid for this driver’s flights.

Source

unsafe fn wait<'a, Q: Quota>( &'a mut self, quota: Q, timeout: Option<Duration>, busy: impl FnOnce() -> bool, ) -> Result<(), Self::Error>
where Self::Context: 'a,

§Safety

Registered storage and kernel identities remain valid for this driver’s flights.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§