pub struct NatsConnectionConfig {
pub url: String,
pub creds: Option<String>,
pub creds_file: Option<String>,
}Expand description
Configuration for NATS connection.
Debug is hand-written, not derived: creds holds decoded credential
material and creds_file a filesystem path to secrets. A derived Debug
would print both verbatim the moment anyone {:?}-formats the config (a
tracing span, an error context, a test dump), leaking credentials into
logs. The redacting impl below keeps that from being one careless format
string away.
Fields§
§url: String§creds: Option<String>Base64-encoded .creds file content (for ECS / containerized environments).
creds_file: Option<String>Path to .creds file on disk (for bare-metal / local development).
Trait Implementations§
Source§impl Clone for NatsConnectionConfig
impl Clone for NatsConnectionConfig
Source§fn clone(&self) -> NatsConnectionConfig
fn clone(&self) -> NatsConnectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NatsConnectionConfig
impl RefUnwindSafe for NatsConnectionConfig
impl Send for NatsConnectionConfig
impl Sync for NatsConnectionConfig
impl Unpin for NatsConnectionConfig
impl UnsafeUnpin for NatsConnectionConfig
impl UnwindSafe for NatsConnectionConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more