[][src]Struct amiquip::ConnectionOptions

pub struct ConnectionOptions<Auth: Sasl> { /* fields omitted */ }

Options that control the overall AMQP connection.

ConnectionOptions uses the builder pattern. The default settings are equivalent to

use amiquip::{Auth, ConnectionOptions};

ConnectionOptions::default()
    .auth(Auth::default())
    .virtual_host("/")
    .locale("en_US")
    .channel_max(0)
    .frame_max(0)
    .heartbeat(60)
    .connection_timeout(None)
    .information(None)

Implementations

impl<Auth: Sasl> ConnectionOptions<Auth>[src]

pub fn auth(self, auth: Auth) -> Self[src]

Sets the SASL authentication method.

pub fn virtual_host<T: Into<String>>(self, virtual_host: T) -> Self[src]

Sets the AMQP virtual host.

pub fn locale<T: Into<String>>(self, locale: T) -> Self[src]

Sets the locale. AMQP requires servers support the en_US locale (which is also the default locale for ConnectionOptions).

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

Sets the maximum number of channels that can be opened simultaneously on this connection. Setting this value to 0 means to let the server choose. If this value is set to a nonzero value that is different from the server's requested value, the lower of the two will be used.

pub fn frame_max(self, frame_max: u32) -> Self[src]

Sets the maximum size in bytes of frames used for this connection. Setting this value to 0 means to let the server choose. If this value is set to a nonzero value that is different from the server's requested value, the lower of the two will be used.

The frame max setting says nothing about the maximum size of messages; messages larger than frame_max bytes will be broken up into multiple frames.

Note that AMQP specifies a minimum frame_max of 4096; attempting to set a value lower than this will result in an error when attempting to open the connection.

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

Sets the heartbeat interval in seconds. Setting this value to 0 disables heartbeats. If this value is greater than 0 but different than the server's requested heartbeat interval, the lower of the two will be used.

pub fn connection_timeout(self, connection_timeout: Option<Duration>) -> Self[src]

Sets the timeout for the initial TCP connection. If None (the default), there is no timeout.

pub fn information(self, information: Option<String>) -> Self[src]

Sets the "information" string reported during handshaking to the server. This string is displayed in the RabbitMQ management interface under "Client properties" of a connection.

Trait Implementations

impl<Auth: Clone + Sasl> Clone for ConnectionOptions<Auth>[src]

impl<Auth: Debug + Sasl> Debug for ConnectionOptions<Auth>[src]

impl<Auth: Sasl> Default for ConnectionOptions<Auth>[src]

impl<Auth: PartialEq + Sasl> PartialEq<ConnectionOptions<Auth>> for ConnectionOptions<Auth>[src]

impl<Auth: Sasl> StructuralPartialEq for ConnectionOptions<Auth>[src]

Auto Trait Implementations

impl<Auth> RefUnwindSafe for ConnectionOptions<Auth> where
    Auth: RefUnwindSafe

impl<Auth> Send for ConnectionOptions<Auth>

impl<Auth> Sync for ConnectionOptions<Auth> where
    Auth: Sync

impl<Auth> Unpin for ConnectionOptions<Auth> where
    Auth: Unpin

impl<Auth> UnwindSafe for ConnectionOptions<Auth> where
    Auth: UnwindSafe

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.