Struct ratsio::stan_client::StanClient[][src]

pub struct StanClient {
    pub options: StanOptions,
    pub nats_client: Arc<NatsClient>,
    pub client_id: String,
    // some fields omitted
}

Fields

options: StanOptionsnats_client: Arc<NatsClient>client_id: String

Implementations

impl StanClient[src]

pub async fn from_options(
    options: StanOptions
) -> Result<Arc<Self>, RatsioError>
[src]

pub async fn subscribe<T>(
    &self,
    subject: T,
    queue_group: Option<T>,
    durable_name: Option<T>
) -> Result<(StanSid, impl Stream<Item = StanMessage> + Send + Sync), RatsioError> where
    T: ToString
[src]

pub async fn subscribe_with_manual_ack<T>(
    &self,
    subject: T,
    queue_group: Option<T>,
    durable_name: Option<T>
) -> Result<(StanSid, impl Stream<Item = StanMessage> + Send + Sync), RatsioError> where
    T: ToString
[src]

pub async fn subscribe_with_all<T>(
    &self,
    subject: T,
    queue_group: Option<T>,
    durable_name: Option<T>,
    max_in_flight: i32,
    ack_wait_in_secs: i32,
    start_position: StartPosition,
    start_sequence: u64,
    start_time_delta: Option<i32>,
    manual_acks: bool
) -> Result<(StanSid, impl Stream<Item = StanMessage> + Send + Sync), RatsioError> where
    T: ToString
[src]

pub async fn subscribe_with<T>(
    &self,
    stan_subscribe: T
) -> Result<(StanSid, impl Stream<Item = StanMessage> + Send + Sync), RatsioError> where
    T: Into<StanSubscribe>, 
[src]

pub async fn acknowledge(&self, message: StanMessage) -> Result<(), RatsioError>[src]

pub async fn publish<T>(
    &self,
    subject: T,
    payload: &[u8]
) -> Result<(), RatsioError> where
    T: ToString
[src]

pub async fn send_with_reply<T>(
    &self,
    subject: T,
    reply_to: T,
    payload: &[u8]
) -> Result<(), RatsioError> where
    T: ToString
[src]

pub async fn send_with<T>(&self, message: T) -> Result<(), RatsioError> where
    T: Into<StanMessage>, 
[src]

pub async fn un_subscribe(&self, stan_sid: &StanSid) -> Result<(), RatsioError>[src]

pub async fn close(&self) -> Result<(), RatsioError>[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.