Enum tokio_stomp_2::ToServer[][src]

pub enum ToServer {
    Send {
        destination: String,
        transaction: Option<String>,
        headers: Vec<(Vec<u8>, Vec<u8>)>,
        body: Option<Vec<u8>>,
    },
    Subscribe {
        destination: String,
        id: String,
        ack: Option<AckMode>,
    },
    Unsubscribe {
        id: String,
    },
    Ack {
        id: String,
        transaction: Option<String>,
    },
    Nack {
        id: String,
        transaction: Option<String>,
    },
    Begin {
        transaction: String,
    },
    Commit {
        transaction: String,
    },
    Abort {
        transaction: String,
    },
    Disconnect {
        receipt: Option<String>,
    },
    // some variants omitted
}

A STOMP message sent by the client. See the Spec for more information

Variants

Send

Send a message to a destination in the messaging system

Fields of Send

destination: Stringtransaction: Option<String>headers: Vec<(Vec<u8>, Vec<u8>)>body: Option<Vec<u8>>
Subscribe

Register to listen to a given destination

Fields of Subscribe

destination: Stringid: Stringack: Option<AckMode>
Unsubscribe

Remove an existing subscription

Fields of Unsubscribe

id: String
Ack

Acknowledge consumption of a message from a subscription using ‘client’ or ‘client-individual’ acknowledgment.

Fields of Ack

id: Stringtransaction: Option<String>
Nack

Notify the server that the client did not consume the message

Fields of Nack

id: Stringtransaction: Option<String>
Begin

Start a transaction

Fields of Begin

transaction: String
Commit

Commit an in-progress transaction

Fields of Commit

transaction: String
Abort

Roll back an in-progress transaction

Fields of Abort

transaction: String
Disconnect

Gracefully disconnect from the server Clients MUST NOT send any more frames after the DISCONNECT frame is sent.

Fields of Disconnect

receipt: Option<String>

Trait Implementations

impl Clone for ToServer[src]

impl Debug for ToServer[src]

impl From<ToServer> for Message<ToServer>[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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.