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.
Publishes a message and waits for the response.
Publishes a message and waits for the response or until the timeout duration is reached
pub async fn request_multi(
&self,
subject: &str,
msg: impl AsRef<[u8]>
) -> Result<Subscription>
pub async fn request_multi(
&self,
subject: &str,
msg: impl AsRef<[u8]>
) -> Result<Subscription>
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 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 Subscription
s.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self