[][src]Struct actix_connector::Connect

pub struct Connect {
    pub kind: ConnectKind,
    pub timeout: Duration,
}

Connect request

Fields

kind: ConnectKindtimeout: Duration

Methods

impl Connect[src]

pub fn new<T: AsRef<str>>(host: T, port: u16) -> Connect[src]

Create new Connect instance.

pub fn with<T: AsRef<str>>(host: T) -> Result<Connect, ConnectorError>[src]

Create Connect instance by spliting the string by ':' and convert the second part to u16

pub fn with_address<T: Into<String>>(host: T, addr: SocketAddr) -> Connect[src]

Create new Connect instance from host and address. Connector skips name resolution stage for such connect messages.

pub fn timeout(self, timeout: Duration) -> Connect[src]

Set connect timeout

By default timeout is set to a 1 second.

Trait Implementations

impl RequestPort for Connect[src]

impl RequestHost for Connect[src]

impl Eq for Connect[src]

impl PartialEq<Connect> for Connect[src]

impl Hash for Connect[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Connect[src]

impl Display for Connect[src]

Auto Trait Implementations

impl Send for Connect

impl Sync for Connect

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T