pub enum MessageState {
Ready,
Processing,
Failed,
}Expand description
Represents the current processing state of a message in the queue.
Messages transition through these states as they are processed:
Ready→Processing(when retrieved by a consumer)Processing→Failed(if processing fails)Failed→Ready(when retried)- Any state → deleted (when explicitly deleted)
§Serialization
States are serialized in PascalCase format (“Ready”, “Processing”, “Failed”) to match the TLQ server API expectations.
§Examples
use tlq_client::MessageState;
let state = MessageState::Ready;
assert_eq!(serde_json::to_string(&state).unwrap(), "\"Ready\"");Variants§
Ready
Message is ready to be processed by a consumer
Processing
Message is currently being processed by a consumer
Failed
Message processing failed and may need to be retried
Trait Implementations§
Source§impl Clone for MessageState
impl Clone for MessageState
Source§fn clone(&self) -> MessageState
fn clone(&self) -> MessageState
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 Debug for MessageState
impl Debug for MessageState
Source§impl<'de> Deserialize<'de> for MessageState
impl<'de> Deserialize<'de> for MessageState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MessageState
impl PartialEq for MessageState
Source§impl Serialize for MessageState
impl Serialize for MessageState
impl StructuralPartialEq for MessageState
Auto Trait Implementations§
impl Freeze for MessageState
impl RefUnwindSafe for MessageState
impl Send for MessageState
impl Sync for MessageState
impl Unpin for MessageState
impl UnwindSafe for MessageState
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