#[non_exhaustive]pub struct Accepted {
pub id: String,
pub duplicate: bool,
pub received_at: String,
}Expand description
The 202 answer: the message is durably stored. It does not mean pushed, delivered or read.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringThe message id (msg_…); the original id when duplicate is true.
duplicate: boolTrue when this idempotency key was already accepted with the same payload in the last 24 hours (nothing new was stored).
received_at: StringWhen the server accepted it (the first time, for a duplicate), as RFC 3339.
Implementations§
Source§impl Accepted
impl Accepted
Sourcepub fn received_at_time(&self) -> Option<SystemTime>
pub fn received_at_time(&self) -> Option<SystemTime>
received_at as a SystemTime, when it parses.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Accepted
impl<'de> Deserialize<'de> for Accepted
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
impl Eq for Accepted
impl StructuralPartialEq for Accepted
Auto Trait Implementations§
impl Freeze for Accepted
impl RefUnwindSafe for Accepted
impl Send for Accepted
impl Sync for Accepted
impl Unpin for Accepted
impl UnsafeUnpin for Accepted
impl UnwindSafe for Accepted
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