[][src]Struct mirai::PollRegistry

pub struct PollRegistry { /* fields omitted */ }

Methods

impl PollRegistry[src]

pub fn try_clone(&self) -> IoResult<Self>[src]

impl PollRegistry[src]

pub fn register<S: Source + ?Sized>(
    &self,
    handle: &mut S,
    interest: Interest,
    wakers: SourceWaker
) -> IoResult<Token>
[src]

Registers a [mio::Evented] handle in the wrapped mio::Poll, along with a std::task::Waker, allowing an async wrapper of the given handle to be woken. This abstracts the mio::Poll <-> mio::Token relationship to allow a reactor to wake wrapped handlers.

Panics

This function may panic if there are more than usize concurrent handlers registered. This is highly unlikely in most practical cases, as process sharding is essentially guaranteed to be needed before that number of handlers is reached.

Trait Implementations

impl Sync for PollRegistry[src]

Safety

The factor that prevents it from being interpreted as safe is the Sender for Token values. The Registry only has a copy for the sake of making copies for Tokens. As long as the Registry doesn't use token_drop_box itself, this is safe.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.