[][src]Trait tcp_typed::Notifier

pub trait Notifier {
    type InstantSlot;
    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); }

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.

Associated Types

Loading content...

Required methods

fn queue(&self)

Poll as soon as possible; equivalent to add_instant(Instant::now()).

fn add_fd(&self, fd: RawFd)

Poll when we receive an edge-triggered event on this file descriptor.

fn remove_fd(&self, fd: RawFd)

No longer poll when we receive events on this file descriptor.

fn add_instant(&self, instant: Instant) -> Self::InstantSlot

Poll at this (typically future) instant.

fn remove_instant(&self, slot: Self::InstantSlot)

No longer poll at this specific previously added instant.

Loading content...

Implementors

Loading content...