[][src]Struct asyncnsq::writer::Writer

pub struct Writer {
    pub stream: Arc<TcpStream>,
    pub address: Address,
}

Fields

stream: Arc<TcpStream>address: Address

Methods

impl Writer[src]

pub async fn reconnect<'_>(&'_ mut self) -> Result<()>[src]

pub async fn connect<'_>(&'_ mut self) -> Result<()>[src]

pub async fn publish<'_, '_>(
    &'_ self,
    topic: &'_ str,
    data: impl Serialize
) -> Result<()>
[src]

publish data

pub async fn delay_publish<'_, '_>(
    &'_ self,
    topic: &'_ str,
    delay: i32,
    data: impl Serialize
) -> Result<()>
[src]

delay publish data

pub async fn multi_publish<'_, '_>(
    &'_ self,
    topic: &'_ str,
    data: Vec<impl Serialize>
) -> Result<()>
[src]

publish multi data

Auto Trait Implementations

impl RefUnwindSafe for Writer

impl Send for Writer

impl Sync for Writer

impl Unpin for Writer

impl UnwindSafe for Writer

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, 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.