Struct tantivy_sstable::value::RangeValueWriter

source ·
pub struct RangeValueWriter { /* private fields */ }
Expand description

Range writer. The range are required to partition the space.

In other words, two consecutive keys k1 and k2 are required to observe range_sstable[k1].end == range_sstable[k2].start.

The writer will panic if the inserted value do not follow this property.

The first range is not required to start at 0.

Trait Implementations§

source§

impl Default for RangeValueWriter

source§

fn default() -> RangeValueWriter

Returns the “default value” for a type. Read more
source§

impl ValueWriter for RangeValueWriter

§

type Value = Range<u64>

Type of the value being written.
source§

fn write(&mut self, val: &Range<u64>)

Records a new value. This method usually just accumulates data in a Vec, only to be serialized on the call to ValueWriter::serialize_block.
source§

fn serialize_block(&self, writer: &mut Vec<u8>)

Serializes the accumulated values into the output buffer.
source§

fn clear(&mut self)

Clears the ValueWriter. After a call to clear, the ValueWriter should behave like a fresh ValueWriter::default().

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.