Trait calloop::sources::EventDispatcher

source ·
pub(crate) trait EventDispatcher<Data> {
    // Required methods
    fn process_events(
        &self,
        readiness: Readiness,
        token: Token,
        data: &mut Data,
    ) -> Result<PostAction>;
    fn register(
        &self,
        poll: &mut Poll,
        additional_lifecycle_register: &mut AdditionalLifecycleEventsSet,
        token_factory: &mut TokenFactory,
    ) -> Result<()>;
    fn reregister(
        &self,
        poll: &mut Poll,
        additional_lifecycle_register: &mut AdditionalLifecycleEventsSet,
        token_factory: &mut TokenFactory,
    ) -> Result<bool>;
    fn unregister(
        &self,
        poll: &mut Poll,
        additional_lifecycle_register: &mut AdditionalLifecycleEventsSet,
        registration_token: RegistrationToken,
    ) -> Result<bool>;
    fn before_sleep(&self) -> Result<Option<(Readiness, Token)>>;
    fn before_handle_events(&self, events: EventIterator<'_>);
}

Required Methods§

source

fn process_events( &self, readiness: Readiness, token: Token, data: &mut Data, ) -> Result<PostAction>

source

fn register( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, token_factory: &mut TokenFactory, ) -> Result<()>

source

fn reregister( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, token_factory: &mut TokenFactory, ) -> Result<bool>

source

fn unregister( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, registration_token: RegistrationToken, ) -> Result<bool>

source

fn before_sleep(&self) -> Result<Option<(Readiness, Token)>>

source

fn before_handle_events(&self, events: EventIterator<'_>)

Implementations on Foreign Types§

source§

impl<Data> EventDispatcher<Data> for RefCell<IoDispatcher>

source§

impl<Data, S, F> EventDispatcher<Data> for RefCell<DispatcherInner<S, F>>
where S: EventSource, F: FnMut(S::Event, &mut S::Metadata, &mut Data) -> S::Ret,

source§

fn process_events( &self, readiness: Readiness, token: Token, data: &mut Data, ) -> Result<PostAction>

source§

fn register( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, token_factory: &mut TokenFactory, ) -> Result<()>

source§

fn reregister( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, token_factory: &mut TokenFactory, ) -> Result<bool>

source§

fn unregister( &self, poll: &mut Poll, additional_lifecycle_register: &mut AdditionalLifecycleEventsSet, registration_token: RegistrationToken, ) -> Result<bool>

source§

fn before_sleep(&self) -> Result<Option<(Readiness, Token)>>

source§

fn before_handle_events(&self, events: EventIterator<'_>)

Implementors§