pub struct Connect {
pub kind: ConnectKind,
pub timeout: Duration,
}
Expand description
Connect request
Fields§
§kind: ConnectKind
§timeout: Duration
Implementations§
source§impl Connect
impl Connect
sourcepub fn with<T: AsRef<str>>(host: T) -> Result<Connect, ConnectorError>
pub fn with<T: AsRef<str>>(host: T) -> Result<Connect, ConnectorError>
Create Connect
instance by spliting the string by ‘:’ and convert the second part to u16
sourcepub fn with_address<T: Into<String>>(host: T, addr: SocketAddr) -> Connect
pub fn with_address<T: Into<String>>(host: T, addr: SocketAddr) -> Connect
Create new Connect
instance from host and address. Connector skips name resolution stage for such connect messages.