pub struct NatsConfig {
pub url: String,
pub stream_name: String,
pub retention: Duration,
pub replicas: usize,
pub crypto: TransportCrypto,
pub replay_cursor: ReplayCursor,
pub sync_ack: bool,
pub max_inflight: u32,
pub stream_shards: u32,
}Expand description
Resolved NATS adapter settings (no env lookups at append time).
Fields§
§url: StringNATS server URL(s).
stream_name: StringJetStream stream name.
retention: DurationStream max age / replay window.
replicas: usizeJetStream stream replica count.
crypto: TransportCryptoPayload envelope crypto.
replay_cursor: ReplayCursorReplay and checkpoint semantics.
sync_ack: boolAwait JetStream publish ack per message.
max_inflight: u32Max concurrent in-flight publishes.
stream_shards: u32Independent JetStream streams for ingress sharding (1 = legacy single stream).
Implementations§
Source§impl NatsConfig
impl NatsConfig
Sourcepub const fn effective_replicas(&self) -> usize
pub const fn effective_replicas(&self) -> usize
Replica count applied when creating shard streams.
Sourcepub const fn is_sharded(&self) -> bool
pub const fn is_sharded(&self) -> bool
Whether publishes route across multiple JetStream streams.
Trait Implementations§
Source§impl Clone for NatsConfig
impl Clone for NatsConfig
Source§fn clone(&self) -> NatsConfig
fn clone(&self) -> NatsConfig
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 NatsConfig
impl RefUnwindSafe for NatsConfig
impl Send for NatsConfig
impl Sync for NatsConfig
impl Unpin for NatsConfig
impl UnsafeUnpin for NatsConfig
impl UnwindSafe for NatsConfig
Blanket Implementations§
impl<T> AsyncConnector for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more