pub struct Reactor { /* private fields */ }Expand description
Thread-owned reactor that wraps the platform-specific backend.
Stored in a RefCell inside the thread-local so that mutable access can be
checked at runtime (panics on re-entrant borrow, which must not happen in
correct code).
Implementations§
Source§impl Reactor
impl Reactor
Sourcepub fn register(
&self,
source: RawSource,
token: usize,
interest: Interest,
) -> Result<()>
pub fn register( &self, source: RawSource, token: usize, interest: Interest, ) -> Result<()>
Register a raw source. Delegates to the platform backend.
Sourcepub fn reregister(
&self,
source: RawSource,
token: usize,
interest: Interest,
) -> Result<()>
pub fn reregister( &self, source: RawSource, token: usize, interest: Interest, ) -> Result<()>
Re-register (update interest) a raw source.
Sourcepub fn deregister(&self, source: RawSource) -> Result<()>
pub fn deregister(&self, source: RawSource) -> Result<()>
Deregister a raw source and remove its wakers from the registry.
Auto Trait Implementations§
impl Freeze for Reactor
impl RefUnwindSafe for Reactor
impl Send for Reactor
impl Sync for Reactor
impl Unpin for Reactor
impl UnsafeUnpin for Reactor
impl UnwindSafe for Reactor
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