Trait Connect

Source
pub trait Connect<'a, S, B, C> {
    // Required method
    fn connect<F: FnMut(&mut TcpClient<'a, B, C>), D: DelayMs<u16>>(
        &mut self,
        server: S,
        port: Port,
        mode: TransportMode,
        delay: &mut D,
        f: &mut F,
    ) -> Result<(), Error>;
}
Expand description

Allows for a TcpClient instance to connect to a remote server by providing either a Hostname or an IpAddress. This trait also makes it possible to implement and support IPv6 addresses.

Required Methods§

Source

fn connect<F: FnMut(&mut TcpClient<'a, B, C>), D: DelayMs<u16>>( &mut self, server: S, port: Port, mode: TransportMode, delay: &mut D, f: &mut F, ) -> Result<(), Error>

Enable a client to connect to server on port using transport layer mode.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, B, C> Connect<'a, &str, B, C> for TcpClient<'a, B, C>

Source§

impl<'a, B, C> Connect<'a, [u8; 4], B, C> for TcpClient<'a, B, C>