pub struct Connect {
pub kind: ConnectKind,
pub timeout: Duration,
}Expand description
Connect request
Fields§
§kind: ConnectKind§timeout: DurationImplementations§
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.
Trait Implementations§
impl Eq for Connect
impl StructuralPartialEq for Connect
Auto Trait Implementations§
impl Freeze for Connect
impl RefUnwindSafe for Connect
impl Send for Connect
impl Sync for Connect
impl Unpin for Connect
impl UnwindSafe for Connect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more