Skip to main content

Keys

Trait Keys 

Source
pub trait Keys {
    // Required method
    fn scan(
        &self,
        each: &mut dyn FnMut(Option<i128>) -> Result<()>,
    ) -> Result<()>;
}
Expand description

A parent key column that can be read more than once, in rid order.

The build wants two passes over a column it does not want to hold, so this is what it reads instead of a slice: something that can be asked to produce the column again. A file can do that for the price of a read, and the second read is against pages the first one just warmed.

Values arrive as Option<i128>, with None for a null. A string key arrives as its dictionary code rather than as text, per section 2.2, which is why one integer signature covers every key type rudb has.

Required Methods§

Source

fn scan(&self, each: &mut dyn FnMut(Option<i128>) -> Result<()>) -> Result<()>

Calls each once per row of the column, in rid order.

§Errors

If the column cannot be read, or if each fails, which stops the scan rather than continuing past a value that could not be used.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Keys for [Option<i128>]

Source§

fn scan(&self, each: &mut dyn FnMut(Option<i128>) -> Result<()>) -> Result<()>

Implementors§