Struct async_nats::message::Message
source · pub struct Message {
pub subject: String,
pub reply: Option<String>,
pub payload: Bytes,
pub headers: Option<HeaderMap>,
pub status: Option<StatusCode>,
pub description: Option<String>,
pub length: usize,
}
Expand description
A Core NATS message.
Fields
subject: String
Subject to which message is published to.
reply: Option<String>
Optional reply subject to which response can be published by crate::Subscriber. Used for request-response pattern with crate::Client::request.
payload: Bytes
Payload of the message. Can be any arbitrary data format.
headers: Option<HeaderMap>
Optional headers. Rust client uses http::header.
status: Option<StatusCode>
Optional Status of the message. Used mostly for internal handling.
description: Option<String>
Optional status description.
length: usize
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more