[][src]Struct lapin_futures_tls_internal::lapin::client::Client

pub struct Client<T> {
    pub configuration: Configuration,
    // some fields omitted
}

the Client structures connects to a server and creates channels

Fields

configuration: Configuration

Methods

impl<T> Client<T> where
    T: 'static + Send + Sync + AsyncRead + AsyncWrite
[src]

pub fn connect(
    stream: T,
    options: ConnectionOptions
) -> impl Send + Future<Item = (Client<T>, Heartbeat<impl Send + Future<Item = (), Error = Error> + 'static>), Error = Error> + 'static
[src]

Takes a stream (TCP, TLS, unix socket, etc) and uses it to connect to an AMQP server.

This function returns a future that resolves once the connection handshake is done. The result is a tuple containing a Client that can be used to create Channels and a Heartbeat instance. The heartbeat is a task (it implements Future) that should be spawned independently of the other futures.

To stop the heartbeat task, see HeartbeatHandle.

pub fn create_channel(
    &self
) -> impl Send + Future<Item = Channel<T>, Error = Error> + 'static
[src]

creates a new channel

returns a future that resolves to a Channel once the method succeeds

pub fn create_confirm_channel(
    &self,
    options: ConfirmSelectOptions
) -> impl Send + Future<Item = Channel<T>, Error = Error> + 'static
[src]

returns a future that resolves to a Channel once the method succeeds the channel will support RabbitMQ's confirm extension

Trait Implementations

impl<T> Clone for Client<T> where
    T: Send
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

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

impl<T> Sync for Client<T> where
    T: Send

Blanket Implementations

impl<T> From for T[src]

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

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

type Owned = T

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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut 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> Erased for T