[][src]Struct ratsio::nats_client::NatsClientOptions

pub struct NatsClientOptions {
    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

impl NatsClientOptions[src]

Trait Implementations

impl Clone for NatsClientOptions[src]

impl Debug for NatsClientOptions[src]

impl Default for NatsClientOptions[src]

impl<'_> From<&'_ str> for NatsClientOptions[src]

impl From<String> for NatsClientOptions[src]

impl<'_> From<Vec<&'_ str>> for NatsClientOptions[src]

impl From<Vec<String>> for NatsClientOptions[src]

impl PartialEq<NatsClientOptions> for NatsClientOptions[src]

impl StructuralPartialEq for NatsClientOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.