pub struct Span {
pub at: u64,
pub take: u64,
}Expand description
The rows a source is being asked for: take of them, starting at at.
This is what a graph reading from a source is handed as its input, and the input is the one value a cache hashes by content. Two numbers, so naming it is free; the rows are named by the source’s version instead.
And it is what makes a stream cacheable. A span is a position, and a position is repeatable: rows 400..500 are the same rows tomorrow, whatever has arrived since. What moves is not the source’s state, it is which spans exist. A source answering whatever is newest is the other thing, and the engine already refuses to cache under it.
Fields§
§at: u64The first row, counting from zero.
take: u64How many, at most: the last span of a dataset is short and that is not an error.
Implementations§
Source§impl Span
impl Span
Trait Implementations§
impl Copy for Span
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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,
§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