Enum SnapshotBracket
pub enum SnapshotBracket<'a, T> {
Empty,
BeforeOldest {
oldest: (u64, &'a T),
},
Exact {
snapshot: (u64, &'a T),
},
Between {
before: (u64, &'a T),
after: (u64, &'a T),
alpha: f64,
},
AfterNewest {
newest: (u64, &'a T),
},
}Expand description
Checked placement of a presentation time within retained snapshot history.
Only Between supplies an interpolation factor. Out-of-range
results expose the nearest endpoint so the host can explicitly choose to hold
it, wait for more snapshots, or apply its own extrapolation policy. See the
module example for a host that only renders in-range queries.
Variants§
Empty
No snapshots are retained, including when the ring has zero capacity.
BeforeOldest
The query precedes the oldest retained tick.
Exact
The query equals a retained tick; no division or interpolation is needed.
Between
Two distinct, consecutive retained snapshots surround the query.
Fields
AfterNewest
The query follows the newest retained tick.
Trait Implementations§
§impl<'a, T> Debug for SnapshotBracket<'a, T>where
T: Debug,
impl<'a, T> Debug for SnapshotBracket<'a, T>where
T: Debug,
§impl<'a, T> PartialEq for SnapshotBracket<'a, T>where
T: PartialEq,
impl<'a, T> PartialEq for SnapshotBracket<'a, T>where
T: PartialEq,
impl<'a, T> StructuralPartialEq for SnapshotBracket<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for SnapshotBracket<'a, T>
impl<'a, T> RefUnwindSafe for SnapshotBracket<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for SnapshotBracket<'a, T>where
T: Sync,
impl<'a, T> Sync for SnapshotBracket<'a, T>where
T: Sync,
impl<'a, T> Unpin for SnapshotBracket<'a, T>
impl<'a, T> UnwindSafe for SnapshotBracket<'a, T>where
T: RefUnwindSafe,
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