pub struct PubCommand {
pub subject: String,
pub reply_to: Option<String>,
pub payload: Bytes,
}
Expand description
The PUB message publishes the message payload to the given subject name, optionally supplying a reply subject. If a reply subject is supplied, it will be delivered to eligible subscribers along with the supplied payload. Note that the payload itself is optional.
Fields§
§subject: String
The destination subject to publish to
reply_to: Option<String>
The optional reply inbox subject that subscribers can use to send a response back to the publisher/requestor
payload: Bytes
The message payload data
Implementations§
Source§impl PubCommand
impl PubCommand
pub fn builder() -> PubCommandBuilder
Sourcepub fn generate_reply_to() -> String
pub fn generate_reply_to() -> String
Generates a random reply_to
String
Trait Implementations§
Source§impl Clone for PubCommand
impl Clone for PubCommand
Source§fn clone(&self) -> PubCommand
fn clone(&self) -> PubCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Command for PubCommand
impl Command for PubCommand
Source§impl Debug for PubCommand
impl Debug for PubCommand
Source§impl PartialEq for PubCommand
impl PartialEq for PubCommand
impl StructuralPartialEq for PubCommand
Auto Trait Implementations§
impl !Freeze for PubCommand
impl RefUnwindSafe for PubCommand
impl Send for PubCommand
impl Sync for PubCommand
impl Unpin for PubCommand
impl UnwindSafe for PubCommand
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