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?;
pub async fn connect<I>(nats_url: I) -> Result<Connection>where
I: IntoServerList,
Connect to a NATS server at the given url.
let nc = nats::asynk::connect("demo.nats.io").await?;