Skip to main content

ConnectSource

Trait ConnectSource 

Source
pub trait ConnectSource<T: Transport>: 'static {
    // Required methods
    fn poll_connect(&mut self, now: Instant) -> ConnectAction<T>;
    fn on_connect_outcome(&mut self, tag: u32, success: bool, now: Instant);

    // Provided method
    fn on_disconnect(&mut self, tag: u32, now: Instant) { ... }
}

Required Methods§

Source

fn poll_connect(&mut self, now: Instant) -> ConnectAction<T>

Source

fn on_connect_outcome(&mut self, tag: u32, success: bool, now: Instant)

Provided Methods§

Source

fn on_disconnect(&mut self, tag: u32, now: Instant)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§