Struct ratsio_fork_040::nats_client::NatsClientOptions[][src]

pub struct NatsClientOptions {
Show 16 fields pub username: String, pub password: String, pub auth_token: String, pub tls_required: bool, pub verbose: bool, pub pedantic: bool, pub echo: bool, pub name: String, pub cluster_uris: UriVec, pub ping_interval: u16, pub ping_max_out: u16, pub subscribe_on_reconnect: bool, pub ensure_connect: bool, pub reconnect_timeout: u64, pub user_jwt: Option<UserJWT>, pub nkey: Option<String>,
}

Fields

username: String

Cluster username, can be overwritten by host url nats://:@:

password: String

Cluster password, can be overwritten by host url nats://:@:

auth_token: String

Cluster auth_token

tls_required: bool

Whether TLS is required.

verbose: bool

verbosity, default true

pedantic: bool

pedantic, default false

echo: bool

pedantic, default true

name: String

Optional client name

cluster_uris: UriVec

Cluster URI in the IP:PORT format

ping_interval: u16

Ping interfval in seconds

ping_max_out: u16

No of unsuccessful pings before the connection is deemed disconnected.

subscribe_on_reconnect: bool

If we should re-subscribe all subscriptions on re-connection. If you don’t want re-subscription, add a reconnect_handler and do your thing there.

ensure_connect: bool

If connect fails, keep trying, forever,

reconnect_timeout: u64

Time between connection retries

user_jwt: Option<UserJWT>

When using NATS 2.x decentralized security, supply a user JWT for authN/authZ

nkey: Option<String>

Nkey authentication

Implementations

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

Returns the “default value” for a type. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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.