[−][src]Struct fibers::io::poll::Poller
I/O events poller.
Methods
impl Poller
[src]
pub fn new() -> Result<Self>
[src]
Creates a new poller.
This is equivalent to Poller::with_capacity(DEFAULT_EVENTS_CAPACITY)
.
pub fn with_capacity(capacity: usize) -> Result<Self>
[src]
Creates a new poller which has an event buffer of which capacity is capacity
.
For the detailed meaning of the capacity
value,
please see the [mio's documentation]
(https://docs.rs/mio/0.6.1/mio/struct.Events.html#method.with_capacity).
pub fn register<E>(&mut self, evented: E) -> Register<E> where
E: Evented + Send + 'static,
[src]
E: Evented + Send + 'static,
Makes a future to register new evented object to the poller.
pub fn poll(&mut self, timeout: Option<Duration>) -> Result<()>
[src]
Blocks the current thread and wait until any events happen or timeout
expires.
On the former case, the poller notifies the fibers waiting on those events.
pub fn handle(&self) -> PollerHandle
[src]
Makes a handle of the poller.
Trait Implementations
Auto Trait Implementations
impl Send for Poller
impl !Sync for Poller
impl Unpin for Poller
impl !UnwindSafe for Poller
impl !RefUnwindSafe for Poller
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,