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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl !RefUnwindSafe for NatsClientOptions
impl Send for NatsClientOptions
impl Sync for NatsClientOptions
impl Unpin for NatsClientOptions
impl !UnwindSafe for NatsClientOptions
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self