Skip to main content

ProjectCellPlan

Struct ProjectCellPlan 

Source
pub struct ProjectCellPlan<S, K, V, K2, V2, W, F>
where S: MapQuery<K, V>, K: Hash + Eq + CellValue, V: CellValue, K2: Hash + Eq + CellValue, V2: CellValue, W: Watchable<Option<(K2, V2)>> + Gettable<Option<(K2, V2)>> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,
{ /* private fields */ }
Expand description

Plan node for ProjectCellExt::project_cell.

Each source row maps to a Watchable<Option<(K2, V2)>>; the watchable’s emissions drive that row’s output. Some((k, v)) includes/updates the row; None excludes it.

Not Clone: cloning a plan would silently duplicate per-row subscription work; share by materializing once.

Trait Implementations§

Source§

impl<S, K, V, K2, V2, W, F> MapQuery<K2, V2> for ProjectCellPlan<S, K, V, K2, V2, W, F>
where S: MapQuery<K, V>, K: Hash + Eq + CellValue, V: CellValue, K2: Hash + Eq + CellValue, V2: CellValue, W: Watchable<Option<(K2, V2)>> + Gettable<Option<(K2, V2)>> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,

Source§

fn materialize(self) -> CellMap<K, V, CellImmutable>

Compile the query into a CellMap and install root-source subscriptions running the fused diff-propagation closure. Read more

Auto Trait Implementations§

§

impl<S, K, V, K2, V2, W, F> Freeze for ProjectCellPlan<S, K, V, K2, V2, W, F>
where S: Freeze,

§

impl<S, K, V, K2, V2, W, F> RefUnwindSafe for ProjectCellPlan<S, K, V, K2, V2, W, F>

§

impl<S, K, V, K2, V2, W, F> Send for ProjectCellPlan<S, K, V, K2, V2, W, F>

§

impl<S, K, V, K2, V2, W, F> Sync for ProjectCellPlan<S, K, V, K2, V2, W, F>

§

impl<S, K, V, K2, V2, W, F> Unpin for ProjectCellPlan<S, K, V, K2, V2, W, F>
where S: Unpin,

§

impl<S, K, V, K2, V2, W, F> UnsafeUnpin for ProjectCellPlan<S, K, V, K2, V2, W, F>
where S: UnsafeUnpin,

§

impl<S, K, V, K2, V2, W, F> UnwindSafe for ProjectCellPlan<S, K, V, K2, V2, W, F>

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<K, V, M> CountByExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn count_by<GK, F>(self, group_key: F) -> CountByPlan<Self, K, V, GK, F>
where GK: Hash + Eq + CellValue, F: Fn(&K, &V) -> GK + Send + Sync + 'static,

Groups rows by group_key(&source_key, &source_value) and stores how many rows are in each group. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<K, V, M> GroupByExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn group_by<GK, F>(self, group_key: F) -> GroupByPlan<Self, K, V, GK, F>
where K: Ord, GK: Hash + Eq + CellValue, F: Fn(&K, &V) -> GK + Send + Sync + 'static,

Groups source rows by group_key(&source_key, &source_value). Read more
Source§

impl<K, V, M> InnerJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn inner_join<R, RV>(self, right: R) -> InnerJoinByKeyPlan<Self, R, K, V, RV>
where R: MapQuery<K, RV>, RV: CellValue,

Inner join on equal map keys. Read more
Source§

fn inner_join_fk<R, RK, RV>( self, right: R, ) -> InnerJoinByPairPlan<Self, R, K, V, RK, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, impl Fn(&RK, &RV) -> K + Send + Sync + 'static>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue + HasForeignKey<V>, <<RV as HasForeignKey<V>>::ForeignKey as IdFor<V>>::MapKey: Into<K>,

Inner join using foreign key relationship. Read more
Source§

fn inner_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> InnerJoinByPairPlan<Self, R, K, V, RK, RV, JK, FL, FR>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Inner join using explicit key extractors. Read more
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<K, V, M> LeftJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn left_join<R, RV>( self, right: R, ) -> LeftJoinPlan<Self, R, K, V, K, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, impl Fn(&K, &RV) -> K + Send + Sync + 'static>
where R: MapQuery<K, RV>, RV: CellValue,

Left join on equal map keys. Read more
Source§

fn left_join_fk<R, RK, RV>( self, right: R, ) -> LeftJoinPlan<Self, R, K, V, RK, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, impl Fn(&RK, &RV) -> K + Send + Sync + 'static>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue + HasForeignKey<V>, <<RV as HasForeignKey<V>>::ForeignKey as IdFor<V>>::MapKey: Into<K>,

Left join using foreign key relationship. Read more
Source§

fn left_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> LeftJoinPlan<Self, R, K, V, RK, RV, JK, FL, FR>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left join using explicit key extractors. Read more
Source§

impl<K, V, M> LeftSemiJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn left_semi_join<R, RV>( self, right: R, ) -> LeftSemiJoinPlan<Self, R, K, V, K, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, impl Fn(&K, &RV) -> K + Send + Sync + 'static>
where R: MapQuery<K, RV>, RV: CellValue,

Left semi join on equal map keys. Read more
Source§

fn left_semi_join_fk<R, RK, RV>( self, right: R, ) -> LeftSemiJoinPlan<Self, R, K, V, RK, RV, K, impl Fn(&K, &V) -> K + Send + Sync + 'static, impl Fn(&RK, &RV) -> K + Send + Sync + 'static>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue + HasForeignKey<V>, <<RV as HasForeignKey<V>>::ForeignKey as IdFor<V>>::MapKey: Into<K>,

Left semi join using foreign key relationship. Read more
Source§

fn left_semi_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_key: FL, right_key: FR, ) -> LeftSemiJoinPlan<Self, R, K, V, RK, RV, JK, FL, FR>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> JK + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left semi join using explicit key extractors. Read more
Source§

impl<K, V, Q> MapQueryShareExt<K, V> for Q
where K: CellValue + Hash + Eq, V: CellValue, Q: MapQuery<K, V>,

Source§

fn share(self) -> SharedMapQuery<K, V>

Convert this map query into a Clone-able multicast handle.
Source§

impl<K, V, M> MultiLeftJoinExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn multi_left_join_by<R, RK, RV, JK, FL, FR>( self, right: R, left_keys: FL, right_key: FR, ) -> MultiLeftJoinPlan<Self, R, K, V, RK, RV, JK, FL, FR>
where R: MapQuery<RK, RV>, RK: Hash + Eq + CellValue, RV: CellValue, JK: Hash + Eq + CellValue, FL: Fn(&K, &V) -> Vec<JK> + Send + Sync + 'static, FR: Fn(&RK, &RV) -> JK + Send + Sync + 'static,

Left join where each left item maps to multiple join keys. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<K, V, M> ProjectCellExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn project_cell<K2, V2, W, F>( self, mapper: F, ) -> ProjectCellPlan<Self, K, V, K2, V2, W, F>
where K2: Hash + Eq + CellValue, V2: CellValue, W: Watchable<Option<(K2, V2)>> + Gettable<Option<(K2, V2)>> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,

Reactive project variant: each row maps to a watchable optional output row. Read more
Source§

impl<K, V, M> ProjectManyExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn project_many<K2, V2, F>(self, f: F) -> ProjectManyPlan<Self, K, V, K2, V2, F>
where K2: Hash + Eq + CellValue, V2: CellValue, F: Fn(&K, &V) -> Vec<(K2, V2)> + Send + Sync + 'static,

Projects each source row to zero, one, or many output rows. Read more
Source§

impl<K, V, M> ProjectMapExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn project<K2, V2, F>(self, f: F) -> ProjectPlan<Self, K, V, K2, V2, F>
where K2: Hash + Eq + CellValue, V2: CellValue, F: Fn(&K, &V) -> Option<(K2, V2)> + Send + Sync + 'static,

Projects each source row to at most one output row. Read more
Source§

impl<K, V, M> SelectCellExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn select_cell<W, F>(self, predicate: F) -> SelectCellPlan<Self, K, V, W, F>
where W: Pipeline<bool> + PipelineSeed<bool> + Gettable<bool> + Clone + Send + Sync + 'static, F: Fn(&K, &V) -> W + Send + Sync + 'static,

Reactive filter: each row has a watchable boolean gate. Read more
Source§

impl<K, V, M> SelectExt<K, V> for M
where K: Hash + Eq + CellValue, V: CellValue, M: MapQuery<K, V>,

Source§

fn select<F>(self, predicate: F) -> SelectPlan<Self, K, V, F>
where F: Fn(&V) -> bool + Send + Sync + 'static,

Filters rows by value. Read more
Source§

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

Source§

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>,

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.