Skip to main content

OrdKeyBatch

Struct OrdKeyBatch 

Source
pub struct OrdKeyBatch<L: Layout> {
    pub storage: OrdKeyStorage<L>,
    pub updates: usize,
    pub value: L::ValContainer,
}
Expand description

An immutable collection of update tuples, from a contiguous interval of logical times.

The L parameter captures how the updates should be laid out, and C determines which merge batcher to select.

Fields§

§storage: OrdKeyStorage<L>

The updates themselves.

§updates: usize

The number of updates reflected in the batch.

We track this separately from storage because due to the singleton optimization, we may have many more updates than storage.updates.len(). It should equal that length, plus the number of singleton optimizations employed.

§value: L::ValContainer

Single value to return if asked.

Implementations§

Source§

impl<L: Layout<ValContainer: BatchContainer<Owned: Default>>> OrdKeyBatch<L>

Source

pub fn create_value() -> L::ValContainer

Creates a container with one value, to slot in to self.value.

Trait Implementations§

Source§

impl<'de, L: Layout> Deserialize<'de> for OrdKeyBatch<L>
where L::KeyContainer: Serialize + for<'a> Deserialize<'a>, L::ValContainer: Serialize + for<'a> Deserialize<'a>, L::OffsetContainer: Serialize + for<'a> Deserialize<'a>, L::TimeContainer: Serialize + for<'a> Deserialize<'a>, L::DiffContainer: Serialize + for<'a> Deserialize<'a>,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<L: Layout<ValContainer: BatchContainer<Owned: Default>>> Merger<OrdKeyBatch<L>> for OrdKeyMerger<L>

Source§

fn new( batch1: &OrdKeyBatch<L>, batch2: &OrdKeyBatch<L>, compaction_frontier: AntichainRef<'_, Time<L>>, ) -> Self

Creates a new merger to merge the supplied batches, optionally compacting up to the supplied frontier.
Source§

fn done(self) -> Option<OrdKeyBatch<L>>

Extracts merged results, absent if the merge cancelled to nothing. Read more
Source§

fn work( &mut self, source1: &OrdKeyBatch<L>, source2: &OrdKeyBatch<L>, fuel: &mut isize, )

Perform some amount of work, decrementing fuel. Read more
Source§

impl<L: Layout<ValContainer: BatchContainer<Owned: Default>>> Navigable for OrdKeyBatch<L>

Source§

type Cursor = OrdKeyCursor<L>

The cursor type. Read more
Source§

fn cursor(&self) -> Self::Cursor

Acquire a cursor suitable for the instance.
Source§

impl<L: Layout> Serialize for OrdKeyBatch<L>
where L::KeyContainer: Serialize + for<'a> Deserialize<'a>, L::ValContainer: Serialize + for<'a> Deserialize<'a>, L::OffsetContainer: Serialize + for<'a> Deserialize<'a>, L::TimeContainer: Serialize + for<'a> Deserialize<'a>, L::DiffContainer: Serialize + for<'a> Deserialize<'a>,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<L: Layout<ValContainer: BatchContainer<Owned: Default>>> SpineBatch for OrdKeyBatch<L>

Source§

type Time = <<L as Layout>::TimeContainer as BatchContainer>::Owned

The timestamp type of the batch’s updates.
Source§

type Merger = OrdKeyMerger<L>

A type used to progressively merge batches.
Source§

fn len(&self) -> usize

The number of updates in the batch. Read more

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> Data for T
where T: Send + Any + Serialize + for<'a> Deserialize<'a>,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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<'a, S, T> Semigroup<&'a S> for T
where T: Semigroup<S>,

Source§

fn plus_equals(&mut self, rhs: &&'a S)

The method of std::ops::AddAssign, for types that do not implement AddAssign.
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.