[][src]Struct ntex_amqp::client::Connector

pub struct Connector<A, T> { /* fields omitted */ }

Amqp client connector

Implementations

impl<A> Connector<A, ()>[src]

pub fn new() -> Connector<A, Connector<A>>[src]

Create new amqp connector

impl<A, T> Connector<A, T> where
    A: Address,
    T: Service<Request = Connect<A>, Error = ConnectError>,
    T::Response: AsyncRead + AsyncWrite + Unpin + 'static, 
[src]

pub fn channel_max(&mut self, num: u16) -> &mut Self[src]

The channel-max value is the highest channel number that may be used on the Connection. This value plus one is the maximum number of Sessions that can be simultaneously active on the Connection.

By default channel max value is set to 1024

pub fn max_frame_size(&mut self, size: u32) -> &mut Self[src]

Set max frame size for the connection.

By default max size is set to 64kb

pub fn get_max_frame_size(&self) -> usize[src]

Get max frame size for the connection.

pub fn idle_timeout(&mut self, timeout: u16) -> &mut Self[src]

Set idle time-out for the connection in seconds.

By default idle time-out is set to 120 seconds

pub fn hostname(&mut self, hostname: &str) -> &mut Self[src]

Set connection hostname

Hostname is not set by default

pub fn handshake_timeout(mut self: Self, timeout: u16) -> Self[src]

Set handshake timeout in milliseconds.

Handshake includes connect packet and response connect-ack. By default handshake timeuot is disabled.

pub fn disconnect_timeout(mut self: Self, timeout: u16) -> Self[src]

Set client connection disconnect timeout in milliseconds.

Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.

To disable timeout set value to 0.

By default disconnect timeout is set to 3 seconds.

pub fn connector<U>(self, connector: U) -> Connector<A, U> where
    U: Service<Request = Connect<A>, Error = ConnectError>,
    U::Response: AsyncRead + AsyncWrite + Unpin + 'static, 
[src]

Use custom connector

pub fn connect(
    &self,
    address: A
) -> impl Future<Output = Result<Client<T::Response>, ConnectError>>
[src]

Connect to amqp server

pub fn negotiate<Io>(
    &self,
    io: Io
) -> impl Future<Output = Result<Client<Io>, ConnectError>> where
    Io: AsyncRead + AsyncWrite + Unpin + 'static, 
[src]

Negotiate amqp protocol over opened socket

pub fn connect_sasl(
    &self,
    addr: A,
    auth: SaslAuth
) -> impl Future<Output = Result<Client<T::Response>, ConnectError>>
[src]

Connect to amqp server

pub fn negotiate_sasl<Io>(
    &self,
    io: Io,
    auth: SaslAuth
) -> impl Future<Output = Result<Client<Io>, ConnectError>> where
    Io: AsyncRead + AsyncWrite + Unpin + 'static, 
[src]

Negotiate amqp sasl protocol over opened socket

Auto Trait Implementations

impl<A, T> RefUnwindSafe for Connector<A, T> where
    A: RefUnwindSafe,
    T: RefUnwindSafe
[src]

impl<A, T> Send for Connector<A, T> where
    A: Send,
    T: Send
[src]

impl<A, T> Sync for Connector<A, T> where
    A: Sync,
    T: Sync
[src]

impl<A, T> Unpin for Connector<A, T> where
    A: Unpin,
    T: Unpin
[src]

impl<A, T> UnwindSafe for Connector<A, T> where
    A: UnwindSafe,
    T: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,