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§
fn poll_connect(&mut self, now: Instant) -> ConnectAction<T>
fn on_connect_outcome(&mut self, tag: u32, success: bool, now: Instant)
Provided Methods§
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".