pub struct SharedMapQuery<K, V>{ /* private fields */ }Expand description
Clone-able multicast handle for fanning a MapQuery out to many
consumers without an intermediate crate::CellMap.
Cloning is an Arc bump and does not subscribe upstream. Subscription
happens lazily on the first downstream materialize() (or other install).
Once installed, the upstream subscription stays live until the last
shared subscriber drops.
Implementations§
Sourcepub fn new<Q: MapQuery<K, V>>(q: Q) -> Self
pub fn new<Q: MapQuery<K, V>>(q: Q) -> Self
Wrap a map query in a shared, multicast handle.
Prefer the MapQueryShareExt::share extension method — it reads as
query.share() at the call site.
Trait Implementations§
Source§fn materialize(self) -> CellMap<K, V, CellImmutable>
fn materialize(self) -> CellMap<K, V, CellImmutable>
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<K, V, M> CountByExt<K, V> for M
impl<K, V, M> CountByExt<K, V> for M
Source§impl<K, V, M> GroupByExt<K, V> for M
impl<K, V, M> GroupByExt<K, V> for M
Source§impl<K, V, M> InnerJoinExt<K, V> for M
impl<K, V, M> InnerJoinExt<K, V> for M
Source§fn inner_join<R, RV>(self, right: R) -> InnerJoinByKeyPlan<Self, R, K, V, RV>
fn inner_join<R, RV>(self, right: R) -> InnerJoinByKeyPlan<Self, R, K, V, RV>
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>,
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>
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>
Inner join using explicit key extractors. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> JoinKeyFrom<T> for Twhere
T: Clone,
impl<T> JoinKeyFrom<T> for Twhere
T: Clone,
fn join_key_from(value: &T) -> T
Source§impl<K, V, M> LeftJoinExt<K, V> for M
impl<K, V, M> LeftJoinExt<K, V> for M
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>
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>
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>,
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>
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>
Left join using explicit key extractors. Read more
Source§impl<K, V, M> LeftSemiJoinExt<K, V> for M
impl<K, V, M> LeftSemiJoinExt<K, V> for M
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>
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>
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>,
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>
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>
Left semi join using explicit key extractors. Read more
Convert this map query into a Clone-able multicast handle.
Source§impl<K, V, M> MultiLeftJoinExt<K, V> for M
impl<K, V, M> MultiLeftJoinExt<K, V> for M
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>
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>
Left join where each left item maps to multiple join keys. Read more
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<K, V, M> ProjectCellExt<K, V> for M
impl<K, V, M> ProjectCellExt<K, V> for M
Source§fn project_cell<K2, V2, W, F>(
self,
mapper: F,
) -> ProjectCellPlan<Self, K, V, K2, V2, W, F>
fn project_cell<K2, V2, W, F>( self, mapper: F, ) -> ProjectCellPlan<Self, K, V, K2, V2, W, F>
Reactive project variant: each row maps to a watchable optional output row. Read more