pub enum Frame {
Publish {
topic: String,
payload: Bytes,
reply_to: Option<String>,
},
Subscribe {
sid: u64,
subject: String,
queue_group: Option<String>,
},
Unsubscribe {
sid: u64,
},
Message {
topic: String,
sid: u64,
payload: Bytes,
reply_to: Option<String>,
},
Ping,
Pong,
Ok,
Err {
message: String,
},
}Expand description
A frame on the wire. This is the unit of communication between client and broker.
Variants§
Publish
Client -> Broker: publish a message to a topic.
Subscribe
Client -> Broker: subscribe to a subject pattern.
Unsubscribe
Client -> Broker: unsubscribe from a subscription.
Message
Broker -> Client: deliver a message to a subscriber.
Ping
Bidirectional: keepalive ping.
Pong
Bidirectional: keepalive pong.
Ok
Broker -> Client: operation succeeded.
Err
Broker -> Client: operation failed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Frame
impl<'de> Deserialize<'de> for Frame
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encoder<Frame> for TopiqCodec
impl Encoder<Frame> for TopiqCodec
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
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