Struct ntex::connect::Connect[][src]

pub struct Connect<T> { /* fields omitted */ }
Expand description

Connect request

Implementations

impl<T: Address> Connect<T>[src]

pub fn new(req: T) -> Connect<T>[src]

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

pub fn with(req: T, addr: SocketAddr) -> Connect<T>[src]

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

pub fn set_port(self, port: u16) -> Self[src]

Use port if address does not provide one.

By default it set to 0

pub fn set_addr(self, addr: Option<SocketAddr>) -> Self[src]

Use address.

pub fn set_addrs<I>(self, addrs: I) -> Self where
    I: IntoIterator<Item = SocketAddr>, 
[src]

Use addresses.

pub fn host(&self) -> &str[src]

Host name

pub fn port(&self) -> u16[src]

Port of the request

pub fn addrs(&self) -> ConnectAddrsIter<'_>[src]

Preresolved addresses of the request.

pub fn take_addrs(&mut self) -> ConnectTakeAddrsIter[src]

Takes preresolved addresses of the request.

pub fn get_ref(&self) -> &T[src]

Return reference to inner type

Trait Implementations

impl<T: Debug> Debug for Connect<T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Address> Display for Connect<T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Address> From<T> for Connect<T>[src]

fn from(addr: T) -> Self[src]

Performs the conversion.

impl<T: Hash> Hash for Connect<T>[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

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<T: PartialEq> PartialEq<Connect<T>> for Connect<T>[src]

fn eq(&self, other: &Connect<T>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Connect<T>) -> bool[src]

This method tests for !=.

impl<T: Eq> Eq for Connect<T>[src]

impl<T> StructuralEq for Connect<T>[src]

impl<T> StructuralPartialEq for Connect<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Connect<T> where
    T: RefUnwindSafe

impl<T> Send for Connect<T> where
    T: Send

impl<T> Sync for Connect<T> where
    T: Sync

impl<T> Unpin for Connect<T> where
    T: Unpin

impl<T> UnwindSafe for Connect<T> where
    T: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> CallHasher for T where
    T: Hash + ?Sized
[src]

pub default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64 where
    H: Hash + ?Sized,
    B: BuildHasher
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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

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

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.