pub struct ReactorApi { /* private fields */ }Expand description
Polling reactor api.
Implementations§
Source§impl ReactorApi
impl ReactorApi
Sourcepub fn attach(&self, fd: i32, id: u32, event: Event)
pub fn attach(&self, fd: i32, id: u32, event: Event)
Attach an fd to the driver.
fd must be attached to the driver before using register/unregister
methods.
Sourcepub fn attach_with_mode(&self, fd: i32, id: u32, event: Event, mode: PollMode)
pub fn attach_with_mode(&self, fd: i32, id: u32, event: Event, mode: PollMode)
Attach an fd to the driver with specific mode.
fd must be attached to the driver before using register/unregister
methods.
Sourcepub fn modify(&self, fd: i32, id: u32, event: Event)
pub fn modify(&self, fd: i32, id: u32, event: Event)
Register interest for specified file descriptor.
Sourcepub fn modify_with_mode(&self, fd: i32, id: u32, event: Event, mode: PollMode)
pub fn modify_with_mode(&self, fd: i32, id: u32, event: Event, mode: PollMode)
Register interest for specified file descriptor.
Sourcepub fn modify_with_mode_deferred(
&self,
fd: i32,
id: u32,
event: Event,
mode: PollMode,
)
pub fn modify_with_mode_deferred( &self, fd: i32, id: u32, event: Event, mode: PollMode, )
Register interest for specified file descriptor, the change may be deferred to the next poll.
On kqueue the change is submitted together with the next wait, saving a syscall. A failure of a deferred change is reported as a readable and writable event.
Sourcepub fn supports_level(&self) -> bool
pub fn supports_level(&self) -> bool
Whether the poller supports level-triggered events.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ReactorApi
impl !Send for ReactorApi
impl !Sync for ReactorApi
impl !UnwindSafe for ReactorApi
impl Freeze for ReactorApi
impl Unpin for ReactorApi
impl UnsafeUnpin for ReactorApi
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