Skip to main content

ResultSet

Struct ResultSet 

Source
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

Source

pub fn new(fetch: Fetch) -> ResultSet

Source

pub fn ids(&self) -> &[u64]

Source

pub fn fetch(&self) -> &Fetch

Source

pub fn deps(&self) -> &Deps

What this set reads: its own columns, and anything it reaches across a relation.

Source

pub fn reset(&mut self, ids: Vec<u64>)

Replace the whole set without narrating (the seed fetch).

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.