pub struct DurableQueue { /* private fields */ }Implementations§
Source§impl DurableQueue
impl DurableQueue
Sourcepub fn enqueue(
&mut self,
op_id: u64,
expiry_unix: u32,
payload: &[u8],
) -> Result<usize, ()>
pub fn enqueue( &mut self, op_id: u64, expiry_unix: u32, payload: &[u8], ) -> Result<usize, ()>
Enqueues payload for op_id expiring at expiry_unix; Err(()) at capacity.
Sourcepub fn mark_relay_write(&self) -> Delivery
pub fn mark_relay_write(&self) -> Delivery
Relay socket write is not this transition.
Sourcepub fn advance(
&mut self,
op_id: u64,
to: Delivery,
now_unix: u32,
) -> Result<(), ()>
pub fn advance( &mut self, op_id: u64, to: Delivery, now_unix: u32, ) -> Result<(), ()>
DurableQueue::advance.
Sourcepub fn expire_due(&mut self, now_unix: u32) -> usize
pub fn expire_due(&mut self, now_unix: u32) -> usize
Drops jobs expiring at or before now_unix; returns count expired.
Source§impl DurableQueue
impl DurableQueue
Source§impl DurableQueue
impl DurableQueue
Sourcepub fn stored_len(&self) -> usize
pub fn stored_len(&self) -> usize
Persisted job count.
Sourcepub fn stored_job(&self, i: usize) -> Option<DurableJob>
pub fn stored_job(&self, i: usize) -> Option<DurableJob>
Persisted job at index i.
Trait Implementations§
Source§impl Clone for DurableQueue
impl Clone for DurableQueue
impl Copy for DurableQueue
Source§impl Debug for DurableQueue
impl Debug for DurableQueue
impl Eq for DurableQueue
Source§impl PartialEq for DurableQueue
impl PartialEq for DurableQueue
impl StructuralPartialEq for DurableQueue
Auto Trait Implementations§
impl Freeze for DurableQueue
impl RefUnwindSafe for DurableQueue
impl Send for DurableQueue
impl Sync for DurableQueue
impl Unpin for DurableQueue
impl UnsafeUnpin for DurableQueue
impl UnwindSafe for DurableQueue
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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