Struct nats::jetstream::StreamMessage
source · [−]pub struct StreamMessage {
pub subject: String,
pub sequence: u64,
pub headers: Option<HeaderMap>,
pub data: Vec<u8>,
pub time: DateTime,
}
Expand description
A message stored in a stream.
Fields
subject: String
Subject of the message.
sequence: u64
Sequence of the message
headers: Option<HeaderMap>
HeaderMap that were sent with the mesage, if any.
data: Vec<u8>
Payload of the message.
time: DateTime
Date and time the message was published.
Trait Implementations
sourceimpl Clone for StreamMessage
impl Clone for StreamMessage
sourcefn clone(&self) -> StreamMessage
fn clone(&self) -> StreamMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StreamMessage
impl Debug for StreamMessage
sourceimpl TryFrom<RawStreamMessage> for StreamMessage
impl TryFrom<RawStreamMessage> for StreamMessage
sourcefn try_from(raw_message: RawStreamMessage) -> Result<StreamMessage, Self::Error>
fn try_from(raw_message: RawStreamMessage) -> Result<StreamMessage, Self::Error>
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl UnwindSafe for StreamMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more