[][src]Struct lapin::Connection

pub struct Connection { /* fields omitted */ }

Methods

impl Connection[src]

pub fn connect(
    uri: &str,
    options: ConnectionProperties
) -> CloseOnDropPromise<Connection>
[src]

Connect to an AMQP Server

pub fn connect_with_identity(
    uri: &str,
    options: ConnectionProperties,
    identity: Identity
) -> CloseOnDropPromise<Connection>
[src]

Connect to an AMQP Server

pub fn connect_uri(
    uri: AMQPUri,
    options: ConnectionProperties
) -> CloseOnDropPromise<Connection>
[src]

Connect to an AMQP Server

pub fn connect_uri_with_identity(
    uri: AMQPUri,
    options: ConnectionProperties,
    identity: Identity
) -> CloseOnDropPromise<Connection>
[src]

Connect to an AMQP Server

pub fn create_channel(&self) -> CloseOnDropPromise<Channel>[src]

pub fn run(&self) -> Result<()>[src]

Block current thread while the connection is still active. This is useful when you only have a consumer and nothing else keeping your application "alive".

pub fn on_error<E: Fn(Error) + Send + 'static>(&self, handler: Box<E>)[src]

pub fn configuration(&self) -> &Configuration[src]

pub fn status(&self) -> &ConnectionStatus[src]

pub fn close(&self, reply_code: ShortUInt, reply_text: &str) -> Promise<()>[src]

pub fn block(&self, reason: &str) -> Promise<()>[src]

Block all consumers and publishers on this connection

pub fn unblock(&self) -> Promise<()>[src]

Unblock all consumers and publishers on this connection

pub fn update_secret(&self, new_secret: &str, reason: &str) -> Promise<()>[src]

Update the secret used by some authentication module such as oauth2

pub fn connector(
    options: ConnectionProperties
) -> impl FnOnce(TcpStream, AMQPUri, Option<(Poll, Token)>) -> Result<CloseOnDropPromise<Connection>> + 'static
[src]

Trait Implementations

impl Clone for Connection[src]

impl Debug for Connection[src]

impl Default for Connection[src]

Auto Trait Implementations

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.