[][src]Struct sonnerie::key_reader::Reader

pub struct Reader { /* fields omitted */ }

Read and filter keys from a single transaction file

Implementations

impl Reader[src]

pub fn new(r: File) -> Result<Reader>[src]

Open a single transaction file

If instead you want to read from an entire database, use DatabaseReader which provides a similar API.

pub fn get<'rdr, 'k>(
    &'rdr self,
    key: &'k str
) -> StringKeyRangeReader<'rdr, 'k, RangeInclusive<&'k str>>

Notable traits for StringKeyRangeReader<'rdr, 'k, RB>

impl<'rdr, 'k, RB> Iterator for StringKeyRangeReader<'rdr, 'k, RB> where
    RB: RangeBounds<&'k str>, 
type Item = OwnedRecord;
[src]

Get a reader for only a single key

Returns an object that will read all of the records for only one key.

pub fn get_range<'rdr, 'k, RB>(
    &'rdr self,
    range: RB
) -> StringKeyRangeReader<'rdr, 'k, RB>

Notable traits for StringKeyRangeReader<'rdr, 'k, RB>

impl<'rdr, 'k, RB> Iterator for StringKeyRangeReader<'rdr, 'k, RB> where
    RB: RangeBounds<&'k str>, 
type Item = OwnedRecord;
where
    RB: RangeBounds<&'k str>, 
[src]

Get a reader for a lexicographic range of keys

Use inclusive or exclusive range syntax to select a range.

Example: rdr.get_range("chimpan-ay" ..= "chimpan-zee")

Range queries are always efficient and readahead may occur.

pub fn get_filter<'rdr, 'k>(
    &'rdr self,
    wildcard: &'k Wildcard
) -> StringKeyRangeReader<'rdr, 'k, RangeFrom<&'k str>>

Notable traits for StringKeyRangeReader<'rdr, 'k, RB>

impl<'rdr, 'k, RB> Iterator for StringKeyRangeReader<'rdr, 'k, RB> where
    RB: RangeBounds<&'k str>, 
type Item = OwnedRecord;
[src]

Get a reader that filters on SQL's "LIKE"-like syntax.

A wildcard filter that has a fixed prefix, such as "chimp%" is always efficient.

pub fn print_info<W: Write>(&self, w: &mut W) -> Result<()>[src]

Print diagnostic information about this transaction file.

This function is for debugging only.

Auto Trait Implementations

impl RefUnwindSafe for Reader

impl Send for Reader

impl Sync for Reader

impl Unpin for Reader

impl UnwindSafe for Reader

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,