Enum tokio_stomp_2::ToServer
source · pub enum ToServer {
Send {
destination: String,
transaction: Option<String>,
headers: Option<Vec<(String, String)>>,
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
}
Expand description
A STOMP message sent by the client. See the Spec for more information
Variants§
Send
Fields
Send a message to a destination in the messaging system
Subscribe
Register to listen to a given destination
Unsubscribe
Remove an existing subscription
Ack
Acknowledge consumption of a message from a subscription using ‘client’ or ‘client-individual’ acknowledgment.
Nack
Notify the server that the client did not consume the message
Begin
Start a transaction
Commit
Commit an in-progress transaction
Abort
Roll back an in-progress transaction
Disconnect
Gracefully disconnect from the server Clients MUST NOT send any more frames after the DISCONNECT frame is sent.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ToServer
impl Send for ToServer
impl Sync for ToServer
impl Unpin for ToServer
impl UnwindSafe for ToServer
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more