[][src]Struct meilies_client::PairedConnection

pub struct PairedConnection { /* fields omitted */ }

A paired connection returns a response to each message send, it is sequential. This connection is used to publish events to streams.

Methods

impl PairedConnection[src]

pub fn connect(
    addr: SocketAddr
) -> impl Future<Item = PairedConnection, Error = Error<Error>>
[src]

Open a framed paired connection with a server.

pub fn publish(
    self,
    stream: StreamName,
    event_name: EventName,
    event_data: EventData
) -> impl Future<Item = PairedConnection, Error = PairedConnectionError>
[src]

Publish an event to a stream, specifying the event name and data.

pub fn last_event_number(
    self,
    stream: StreamName
) -> impl Future<Item = (StreamName, Option<EventNumber>, PairedConnection), Error = PairedConnectionError>
[src]

Request the last event number that the stream is at.

Returns None if the stream does not contain any event.

Auto Trait Implementations

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> Any for T where
    T: 'static + ?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> Erased for T