Skip to main content

Rids

Struct Rids 

Source
pub struct Rids { /* private fields */ }
Expand description

A set of row ids of one table of a known number of rows.

Implementations§

Source§

impl Rids

Source

pub fn full(rows: u64) -> Self

Every row of a table of rows.

Source

pub fn none(rows: u64) -> Self

No row of a table of rows.

Source

pub fn from_sorted(rows: u64, members: Vec<Rid>) -> Result<Self>

The set holding exactly members, which have to be strictly increasing and below rows.

§Errors

If a member is out of order, repeated or past the end. A set that silently dropped one of those would be a reduction that removed a row which joins.

Source

pub fn from_words(rows: u64, words: Vec<u64>) -> Result<Self>

The set whose members are the set bits of words, least significant bit of word zero first.

§Errors

If words is not the number of words rows bits take, or a bit past rows is set.

Source

pub fn rows(&self) -> u64

Rows in the table this is a set over.

Source

pub fn len(&self) -> u64

Rows in the set.

Source

pub fn is_empty(&self) -> bool

Whether no row is in the set.

Source

pub fn is_full(&self) -> bool

Whether every row is in the set.

Source

pub fn form(&self) -> Form

Which form the set is held in.

Source

pub fn bytes(&self) -> usize

Bytes the set holds on to.

Source

pub fn contains(&self, rid: Rid) -> bool

Whether rid is in the set.

Source

pub fn any_between(&self, low: Rid, high: Rid) -> bool

Whether any member is between low and high, both included.

The question a part skip asks: the link’s zone map says the children of this part point at parents in that range, and a range holding no member is a part that cannot contribute.

Source

pub fn iter(&self) -> impl Iterator<Item = Rid> + '_

The members, in increasing order.

Source

pub fn intersect(&self, other: &Self) -> Result<Self>

The rows in both sets.

§Errors

If the two are over tables of different sizes, which is two different tables.

Source

pub fn union(&self, other: &Self) -> Result<Self>

The rows in either set.

§Errors

If the two are over tables of different sizes.

Source

pub fn forward(&self, link: &Link) -> Result<Pushed>

Pushes a set of parent rows forward through link, to the child rows that point into it.

One pass over the link in child order, which is section 4.3’s first push. A part whose zone map says its children point only at parents outside the set is never decoded, which is section 5.5’s part skip and on a child clustered by the parent is most of the table.

§Errors

If this set is not over the link’s parent table.

Source

pub fn forward_or_stop(&self, link: &Link) -> Result<Pushed>

The same push, giving up once it is plain that the set removes nothing.

Section 5.4’s early stop. A push that has covered the first STOP_AFTERth of the child and kept every row of it stops there and hands back every row, so a reduction that was never going to remove anything costs a third of a push and then nothing, where finishing would cost the rest of the push and a bit test per row of the scan. The answer is then a superset of the children that point into the set, which is all a join that still matches every row needs, and Pushed::stopped says so.

§Errors

If this set is not over the link’s parent table.

Source

pub fn backward(&self, link: &Link) -> Result<Self>

Pushes a set of child rows backward through link, to the parents they point at.

The second push of section 4.3, a pass over the link setting a bit per surviving child. It reads the link in child order just as the forward push does, so it needs no backward structure, and a child without a parent contributes nothing.

§Errors

If this set is not over the link’s child table.

Trait Implementations§

Source§

impl Clone for Rids

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Rids

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Rids

Source§

impl PartialEq for Rids

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Rids

Auto Trait Implementations§

§

impl Freeze for Rids

§

impl RefUnwindSafe for Rids

§

impl Send for Rids

§

impl Sync for Rids

§

impl Unpin for Rids

§

impl UnsafeUnpin for Rids

§

impl UnwindSafe for Rids

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.