Skip to main content

JoinedSource

Struct JoinedSource 

Source
pub struct JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out> { /* private fields */ }
Expand description

Projected source over a keyed cross join: each accepted (A, B) pair with equal keys emits one Out row. Built by stream::cross::Bi::project.

Trait Implementations§

Source§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Source<S, Out> for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where S: Send + Sync + 'static, A: Clone + Send + Sync + 'static, B: Clone + Send + Sync + 'static, K: Eq + Hash + Clone + Send + Sync + 'static, EA: CollectionExtract<S, Item = A>, EB: CollectionExtract<S, Item = B>, KA: Fn(&A) -> K + Send + Sync, KB: Fn(&B) -> K + Send + Sync, F: BiFilter<S, A, B>, P: Fn(&A, &B) -> Out + Send + Sync, Out: Send + Sync + 'static,

Source§

const MAX_EMITS: usize = 1

The most rows the source emits for one owner (see Projection::MAX_EMITS).
Source§

type State = JoinedState<K>

State the source keeps beside the retained rows, such as a join index.
Source§

fn source_count(&self) -> usize

Number of entity collections the source reads.
Source§

fn change_source(&self, slot: usize) -> ChangeSource

How changes reach collection slot.
Source§

fn build_state(&self, solution: &S) -> Self::State

Builds the source state for solution.
Source§

fn collect_all<V>(&self, solution: &S, state: &Self::State, visit: V)
where V: FnMut(RowCoordinate, Out),

Visits every row of solution with its coordinate.
Source§

fn collect_entity<V>( &self, solution: &S, state: &Self::State, slot: usize, entity_index: usize, visit: V, )
where V: FnMut(RowCoordinate, Out),

Visits the rows owned by entity entity_index of collection slot.
Source§

fn insert_entity_state( &self, solution: &S, state: &mut Self::State, slot: usize, entity_index: usize, )

Adds entity entity_index of collection slot to the source state.
Source§

fn retract_entity_state( &self, solution: &S, state: &mut Self::State, slot: usize, entity_index: usize, )

Removes entity entity_index of collection slot from the source state.

Auto Trait Implementations§

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Forget for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Freeze for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: Freeze, EB: Freeze, KA: Freeze, KB: Freeze, F: Freeze, P: Freeze, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: Freeze,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> RefUnwindSafe for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: RefUnwindSafe, EB: RefUnwindSafe, KA: RefUnwindSafe, KB: RefUnwindSafe, F: RefUnwindSafe, P: RefUnwindSafe, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: RefUnwindSafe,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Send for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: Send, EB: Send, KA: Send, KB: Send, F: Send, P: Send, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: Send,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Sync for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: Sync, EB: Sync, KA: Sync, KB: Sync, F: Sync, P: Sync, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: Sync,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> Unpin for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: Unpin, EB: Unpin, KA: Unpin, KB: Unpin, F: Unpin, P: Unpin, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: Unpin,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> UnsafeUnpin for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: UnsafeUnpin, EB: UnsafeUnpin, KA: UnsafeUnpin, KB: UnsafeUnpin, F: UnsafeUnpin, P: UnsafeUnpin, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: UnsafeUnpin,

§

impl<S, A, B, K, EA, EB, KA, KB, F, P, Out> UnwindSafe for JoinedSource<S, A, B, K, EA, EB, KA, KB, F, P, Out>
where EA: UnwindSafe, EB: UnwindSafe, KA: UnwindSafe, KB: UnwindSafe, F: UnwindSafe, P: UnwindSafe, PhantomData<(fn() -> S, fn() -> A, fn() -> B, fn() -> K, fn() -> Out)>: UnwindSafe,

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

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.