[][src]Struct nats::Client

pub struct Client { /* fields omitted */ }

Methods

impl Client[src]

pub fn new<T: ToStringVec>(uris: T) -> Result<Client, NatsError>[src]

pub fn set_synchronous(&mut self, synchronous: bool)[src]

pub fn set_name(&mut self, name: &str)[src]

pub fn set_tls_config(&mut self, config: TlsConfig)[src]

pub fn subscribe(
    &mut self,
    subject: &str,
    queue: Option<&str>
) -> Result<Channel, NatsError>
[src]

pub fn unsubscribe(&mut self, channel: Channel) -> Result<(), NatsError>[src]

pub fn unsubscribe_after(
    &mut self,
    channel: Channel,
    max: u64
) -> Result<(), NatsError>
[src]

pub fn publish(&mut self, subject: &str, msg: &[u8]) -> Result<(), NatsError>[src]

pub fn publish_with_inbox(
    &mut self,
    subject: &str,
    msg: &[u8],
    inbox: &str
) -> Result<(), NatsError>
[src]

pub fn make_request(
    &mut self,
    subject: &str,
    msg: &[u8]
) -> Result<String, NatsError>
[src]

pub fn wait(&mut self) -> Result<Event, NatsError>[src]

Important traits for Events<'t>
pub fn events(&mut self) -> Events[src]

Trait Implementations

impl Debug for Client[src]

Auto Trait Implementations

impl Send for Client

impl Sync for Client

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]