pub enum ClientFrame {
    Abort(AbortFrame),
    Ack(AckFrame),
    Begin(BeginFrame),
    Commit(CommitFrame),
    Connect(ConnectFrame),
    Disconnect(DisconnectFrame),
    Nack(NackFrame),
    Send(SendFrame),
    Subscribe(SubscribeFrame),
    Unsubscribe(UnsubscribeFrame),
}
Expand description

The ClientFrame enum contains a variant for each frame that the client can send.

The try_from(bytes: Vec<u8>) method, provided via an implementaton of TryFrom<Vec<u8>>, is the recommended way to obtain a Frame from a received message.

Variants§

§

Abort(AbortFrame)

Aborts a transaction that has begun but not yet been committed.

§

Ack(AckFrame)

Acknowledges a received message.

§

Begin(BeginFrame)

Begins a transaction.

§

Commit(CommitFrame)

Commits a transaction.

§

Connect(ConnectFrame)

Initiates a STOMP session.

§

Disconnect(DisconnectFrame)

Ends a STOMP session.

§

Nack(NackFrame)

Indicates that the client did not, or could not, process a message.

§

Send(SendFrame)

Sends a message to a specific destination.

§

Subscribe(SubscribeFrame)

Subscribes to a specific destination.

§

Unsubscribe(UnsubscribeFrame)

Cancels a specific subscription.

Trait Implementations§

source§

impl Debug for ClientFrame

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Into<Vec<u8, Global>> for ClientFrame

This implementation serialises ClientFrame into a byte array.

source§

fn into(self) -> Vec<u8>

Converts this type into the (usually inferred) input type.
source§

impl TryFrom<Vec<u8, Global>> for ClientFrame

Parses a ClientFrame from the data contained in the provided vector of bytes.

§

type Error = StompParseError

The type returned in the event of a conversion error.
source§

fn try_from(bytes: Vec<u8>) -> Result<Self, StompParseError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.