pub struct ListQuery {
pub statuses: Vec<EffectStatus>,
pub lease_expired_at: Option<SystemTime>,
pub after: Option<EffectId>,
pub limit: usize,
}Expand description
A filter for EffectStore::list.
Fields§
§statuses: Vec<EffectStatus>Only these statuses. Empty means any status.
lease_expired_at: Option<SystemTime>Only records without a live lease at this time.
after: Option<EffectId>Only records with a greater id, for paging.
limit: usizeAt most this many records.
Implementations§
Source§impl ListQuery
impl ListQuery
Sourcepub const DEFAULT_LIMIT: usize = 100
pub const DEFAULT_LIMIT: usize = 100
The default page size.
Sourcepub fn statuses(statuses: impl IntoIterator<Item = EffectStatus>) -> Self
pub fn statuses(statuses: impl IntoIterator<Item = EffectStatus>) -> Self
Records in any of statuses.
Sourcepub fn expired_leases(now: SystemTime) -> Self
pub fn expired_leases(now: SystemTime) -> Self
Records stuck mid-attempt: executing or verifying with no live lease
at now. Recovery moves these to Unknown.
Sourcepub fn matches(&self, record: &EffectRecord) -> bool
pub fn matches(&self, record: &EffectRecord) -> bool
Whether record passes the filter (ignoring limit).
Trait Implementations§
impl Eq for ListQuery
impl StructuralPartialEq for ListQuery
Auto Trait Implementations§
impl Freeze for ListQuery
impl RefUnwindSafe for ListQuery
impl Send for ListQuery
impl Sync for ListQuery
impl Unpin for ListQuery
impl UnsafeUnpin for ListQuery
impl UnwindSafe for ListQuery
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