pub struct NatsServerCmd { /* private fields */ }
Available on crate feature
nats
only.Implementations§
Source§impl NatsServerCmd
impl NatsServerCmd
pub fn with_user(self, user: &str) -> Self
pub fn with_password(self, password: &str) -> Self
Sourcepub fn with_jetstream(self) -> Self
pub fn with_jetstream(self) -> Self
Enable JetStream in the Nats server to use the built-in persistence features of NATS.
See: https://docs.nats.io/nats-concepts/jetstream
Example:
ⓘ
let nats_cmd = NatsServerCmd::default().with_jetstream();
let node = Nats::default().with_cmd(&nats_cmd).start().await?;
Trait Implementations§
Source§impl Clone for NatsServerCmd
impl Clone for NatsServerCmd
Source§fn clone(&self) -> NatsServerCmd
fn clone(&self) -> NatsServerCmd
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NatsServerCmd
impl Debug for NatsServerCmd
Source§impl Default for NatsServerCmd
impl Default for NatsServerCmd
Source§fn default() -> NatsServerCmd
fn default() -> NatsServerCmd
Returns the “default value” for a type. Read more
Source§impl IntoIterator for &NatsServerCmd
impl IntoIterator for &NatsServerCmd
Auto Trait Implementations§
impl Freeze for NatsServerCmd
impl RefUnwindSafe for NatsServerCmd
impl Send for NatsServerCmd
impl Sync for NatsServerCmd
impl Unpin for NatsServerCmd
impl UnwindSafe for NatsServerCmd
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
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