Function nats::asynk::connect

source ·
pub async fn connect<I>(nats_url: I) -> Result<Connection>
where I: IntoServerList,
Expand description

Connect to a NATS server at the given url.

§Example

let nc = nats::asynk::connect("demo.nats.io").await?;