pub struct EntriesRangeRequest {
pub before: Option<u64>,
pub limit: u64,
}Expand description
session.entries-range payload after validation: before is None when
the client asked for the tail (the answer substitutes total).
Fields§
§before: Option<u64>§limit: u64Implementations§
Source§impl EntriesRangeRequest
impl EntriesRangeRequest
Sourcepub fn resolve(&self, total: u64) -> (u64, u64)
pub fn resolve(&self, total: u64) -> (u64, u64)
The absolute window over a transcript of total entries: before is
clamped to total (TS Math.min(total, before)), the start is floored
at zero (TS Math.max(0, before - limit)), and an absent before
means the end. Returns the half-open (start, end) slice bounds.
Trait Implementations§
Source§impl Clone for EntriesRangeRequest
impl Clone for EntriesRangeRequest
Source§impl Debug for EntriesRangeRequest
impl Debug for EntriesRangeRequest
impl Eq for EntriesRangeRequest
Source§impl PartialEq for EntriesRangeRequest
impl PartialEq for EntriesRangeRequest
impl StructuralPartialEq for EntriesRangeRequest
Auto Trait Implementations§
impl Forget for EntriesRangeRequest
impl Freeze for EntriesRangeRequest
impl Move for EntriesRangeRequest
impl RefUnwindSafe for EntriesRangeRequest
impl Send for EntriesRangeRequest
impl Sync for EntriesRangeRequest
impl Unpin for EntriesRangeRequest
impl UnsafeUnpin for EntriesRangeRequest
impl UnwindSafe for EntriesRangeRequest
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