pub struct ResultSet { /* private fields */ }Expand description
A query’s result set: the ids the SQL last answered, and the diff machinery that turns the next answer into list deltas.
Implementations§
Source§impl ResultSet
impl ResultSet
pub fn new(fetch: Fetch) -> ResultSet
pub fn ids(&self) -> &[u64]
pub fn fetch(&self) -> &Fetch
Sourcepub fn deps(&self) -> &Deps
pub fn deps(&self) -> &Deps
What this set reads: its own columns, and anything it reaches across a relation.
Sourcepub fn reset(&mut self, ids: Vec<u64>)
pub fn reset(&mut self, ids: Vec<u64>)
Replace the whole set without narrating (the seed fetch).
Sourcepub fn adopt(&mut self, new: Vec<u64>) -> SetChange
pub fn adopt(&mut self, new: Vec<u64>) -> SetChange
Adopt a requery’s answer, narrating the difference. Removals and insertions (in any combination) come back as exact deltas, plus at most one reposition among the retained rows; anything more tangled reloads. Every delta list is verified by simulation before it is returned, so a consumer applying the deltas in order always lands on the new set.
Auto Trait Implementations§
impl Forget for ResultSet
impl Freeze for ResultSet
impl RefUnwindSafe for ResultSet
impl Send for ResultSet
impl Sync for ResultSet
impl Unpin for ResultSet
impl UnsafeUnpin for ResultSet
impl UnwindSafe for ResultSet
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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