[−][src]Struct ratsio::nats_client::NatsClient
Implementations
impl NatsClient
[src]
pub async fn new<O>(options: O) -> Result<Arc<Self>, RatsioError> where
O: Into<NatsClientOptions>,
[src]
O: Into<NatsClientOptions>,
pub async fn subscribe<T, '_>(
&'_ self,
subject: T
) -> Result<(NatsSid, impl Stream<Item = Message> + Send + Sync), RatsioError> where
T: ToString,
[src]
&'_ self,
subject: T
) -> Result<(NatsSid, impl Stream<Item = Message> + Send + Sync), RatsioError> where
T: ToString,
pub async fn subscribe_with_group<T, '_>(
&'_ self,
subject: T,
group: T
) -> Result<(NatsSid, impl Stream<Item = Message> + Send + Sync), RatsioError> where
T: ToString,
[src]
&'_ self,
subject: T,
group: T
) -> Result<(NatsSid, impl Stream<Item = Message> + Send + Sync), RatsioError> where
T: ToString,
pub async fn un_subscribe<'_, '_>(
&'_ self,
sid: &'_ NatsSid
) -> Result<(), RatsioError>
[src]
&'_ self,
sid: &'_ NatsSid
) -> Result<(), RatsioError>
pub async fn publish<T, '_, '_>(
&'_ self,
subject: T,
data: &'_ [u8]
) -> Result<(), RatsioError> where
T: ToString,
[src]
&'_ self,
subject: T,
data: &'_ [u8]
) -> Result<(), RatsioError> where
T: ToString,
pub async fn publish_with_reply_to<T, '_, '_>(
&'_ self,
subject: T,
reply_to: T,
data: &'_ [u8]
) -> Result<(), RatsioError> where
T: ToString,
[src]
&'_ self,
subject: T,
reply_to: T,
data: &'_ [u8]
) -> Result<(), RatsioError> where
T: ToString,
pub async fn request<T, '_, '_>(
&'_ self,
subject: T,
data: &'_ [u8]
) -> Result<Message, RatsioError> where
T: ToString,
[src]
&'_ self,
subject: T,
data: &'_ [u8]
) -> Result<Message, RatsioError> where
T: ToString,
pub async fn close<'_>(&'_ self) -> Result<(), RatsioError>
[src]
pub async fn add_reconnect_handler<'_>(
&'_ self,
handler: Box<dyn Fn(&NatsClient) + Send + Sync>
) -> Result<(), RatsioError>
[src]
&'_ self,
handler: Box<dyn Fn(&NatsClient) + Send + Sync>
) -> Result<(), RatsioError>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for NatsClient
impl Send for NatsClient
impl Sync for NatsClient
impl Unpin for NatsClient
impl !UnwindSafe for NatsClient
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,