pub struct Message<T = Value> {
pub msg_id: i64,
pub vt: DateTime<Utc>,
pub enqueued_at: DateTime<Utc>,
pub read_ct: i32,
pub message: T,
}
Expand description
Message struct received from the queue
It is an “envelope” for the message that is stored in the queue. It contains both the message body but also metadata about the message.
Fields§
§msg_id: i64
unique identifier for the message
vt: DateTime<Utc>
“visibility time”. The UTC timestamp at which the message will be available for reading again.
enqueued_at: DateTime<Utc>
UTC timestamp that the message was sent to the queue
read_ct: i32
The number of times the message has been read. Increments on read.
message: T
The message body.
Trait Implementations§
source§impl<'de, T> Deserialize<'de> for Message<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Message<T>where
T: Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Message<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Message<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, R, T> FromRow<'a, R> for Message<T>where
R: Row,
&'a str: ColumnIndex<R>,
i64: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
i32: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
T: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
impl<'a, R, T> FromRow<'a, R> for Message<T>where
R: Row,
&'a str: ColumnIndex<R>,
i64: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
DateTime<Utc>: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
i32: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
T: Decode<'a, <R as Row>::Database> + Type<<R as Row>::Database>,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Message<T>where
T: RefUnwindSafe,
impl<T> Send for Message<T>where
T: Send,
impl<T> Sync for Message<T>where
T: Sync,
impl<T> Unpin for Message<T>where
T: Unpin,
impl<T> UnwindSafe for Message<T>where
T: UnwindSafe,
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