pub trait Notifier {
type InstantSlot;
// Required methods
fn queue(&self);
fn add_fd(&self, fd: RawFd);
fn remove_fd(&self, fd: RawFd);
fn add_instant(&self, instant: Instant) -> Self::InstantSlot;
fn remove_instant(&self, slot: Self::InstantSlot);
}
Expand description
Implementers and users are responsible for calling fn poll(self, &impl Notifier)
on Connections or the states (Connecter, Connectee, ConnecterLocalClosed, etc) as instructed by calls made to it via this trait.
Required Associated Types§
type InstantSlot
Required Methods§
Sourcefn add_fd(&self, fd: RawFd)
fn add_fd(&self, fd: RawFd)
Poll when we receive an edge-triggered event on this file descriptor.
Sourcefn add_instant(&self, instant: Instant) -> Self::InstantSlot
fn add_instant(&self, instant: Instant) -> Self::InstantSlot
Poll at this (typically future) instant.
Sourcefn remove_instant(&self, slot: Self::InstantSlot)
fn remove_instant(&self, slot: Self::InstantSlot)
No longer poll at this specific previously added instant.