[][src]Struct fibers::io::poll::Poller

pub struct Poller { /* fields omitted */ }

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]

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

impl Debug for Poller[src]

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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]