pub struct QueuedRequest {
pub kind: QueuedRequestKind,
pub transaction_id: OwnedTransactionId,
pub error: Option<QueueWedgeError>,
pub priority: usize,
pub created_at: MilliSecondsSinceUnixEpoch,
}Expand description
A request to be sent with a send queue.
Fields§
§kind: QueuedRequestKindThe kind of queued request we’re going to send.
transaction_id: OwnedTransactionIdUnique transaction id for the queued request, acting as a key.
error: Option<QueueWedgeError>Error returned when the request couldn’t be sent and is stuck in the unrecoverable state.
None if the request is in the queue, waiting to be sent.
priority: usizeAt which priority should this be handled?
The bigger the value, the higher the priority at which this request should be handled.
created_at: MilliSecondsSinceUnixEpochThe time that the request was originally attempted.
Implementations§
Source§impl QueuedRequest
impl QueuedRequest
Sourcepub fn as_event(&self) -> Option<&SerializableEventContent>
pub fn as_event(&self) -> Option<&SerializableEventContent>
Returns Some if the queued request is about sending an event.
Sourcepub fn is_wedged(&self) -> bool
pub fn is_wedged(&self) -> bool
True if the request couldn’t be sent because of an unrecoverable API
error. See Self::error for more details on the reason.
Trait Implementations§
Source§impl Clone for QueuedRequest
impl Clone for QueuedRequest
Source§fn clone(&self) -> QueuedRequest
fn clone(&self) -> QueuedRequest
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for QueuedRequest
impl RefUnwindSafe for QueuedRequest
impl Send for QueuedRequest
impl Sync for QueuedRequest
impl Unpin for QueuedRequest
impl UnwindSafe for QueuedRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more