Struct nats::asynk::Connection[][src]

pub struct Connection { /* fields omitted */ }
Expand description

A NATS client connection.

Implementations

Publishes a message.

Publishes a message with a reply subject.

Creates a new unique subject for receiving replies.

Publishes a message and waits for the response.

Publishes a message and waits for the response or until the timeout duration is reached

Publishes a message and returns a subscription for awaiting the response.

Creates a subscription.

Creates a queue subscription.

Flushes by performing a round trip to the server.

Flushes by performing a round trip to the server or times out after a duration of time.

Calculates the round trip time between this client and the server.

Returns the client IP as known by the most recently connected server.

Supported as of server version 2.1.6.

Returns the client ID as known by the most recently connected server.

Unsubscribes all subscriptions and flushes the connection.

Remaining messages can still be received by existing Subscriptions.

Closes the connection.

Publish a message which may have a reply subject or headers set.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.