pub struct NatsConnectionSpec {
pub auth: Option<NatsAuthorization>,
pub hosts: Vec<String>,
}Fields§
§auth: Option<NatsAuthorization>§hosts: Vec<String>Implementations§
Source§impl NatsConnectionSpec
impl NatsConnectionSpec
pub fn from_url(url: &str) -> Result<Self>
pub fn connect_options(&self) -> ConnectOptions
pub async fn connect_with_retry(&self) -> Result<TypedNats>
pub async fn connect(&self) -> Result<TypedNats>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NatsConnectionSpec
impl<'de> Deserialize<'de> for NatsConnectionSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NatsConnectionSpec
impl RefUnwindSafe for NatsConnectionSpec
impl Send for NatsConnectionSpec
impl Sync for NatsConnectionSpec
impl Unpin for NatsConnectionSpec
impl UnwindSafe for NatsConnectionSpec
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