JoinStream

Struct JoinStream 

Source
pub struct JoinStream<Key, Out1: ExchangeData, Out2: ExchangeData, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where OperatorChain1: Operator<Out = Out1>, OperatorChain2: Operator<Out = Out2>, Keyer1: KeyerFn<Key, Out1>, Keyer2: KeyerFn<Key, Out2>,
{ /* private fields */ }
Expand description

Intermediate stream type for building the join between two streams.

This type has methods for selecting the ship strategy of the join, later you will be able to select the local strategy, and finally the variant of the join.

Implementations§

Source§

impl<Key: Data, Out1: ExchangeData, Out2: ExchangeData, OperatorChain1, OperatorChain2, Keyer1, Keyer2> JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where OperatorChain1: Operator<Out = Out1> + 'static, OperatorChain2: Operator<Out = Out2> + 'static, Keyer1: KeyerFn<Key, Out1>, Keyer2: KeyerFn<Key, Out2>,

Source

pub fn ship_hash(self) -> JoinStreamShipHash<Key, Out1, Out2, Keyer1, Keyer2>
where Key: DataKey,

Use the Hash Repartition strategy.

With this strategy the two streams are shuffled (like a group-by), pointing the message with the same key to the same replica. The key must be hashable.

Source

pub fn ship_broadcast_right( self, ) -> JoinStreamShipBroadcastRight<Key, Out1, Out2, Keyer1, Keyer2>

Use the Broadcast-Forward strategy.

The left side won’t be sent to the network, while the right side is broadcasted. This is recommended when the left side is really big and the left side really small.

This does not require the key to be hashable.

Auto Trait Implementations§

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> Freeze for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where Keyer1: Freeze, Keyer2: Freeze, OperatorChain1: Freeze, OperatorChain2: Freeze,

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> !RefUnwindSafe for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> Send for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where Key: Send,

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> Sync for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where Keyer1: Sync, Keyer2: Sync, Key: Sync, OperatorChain1: Sync, OperatorChain2: Sync,

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> Unpin for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>
where Keyer1: Unpin, Keyer2: Unpin, Key: Unpin, OperatorChain1: Unpin, OperatorChain2: Unpin,

§

impl<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2> !UnwindSafe for JoinStream<Key, Out1, Out2, OperatorChain1, OperatorChain2, Keyer1, Keyer2>

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> 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<T> Same for T

Source§

type Output = T

Should always be Self
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.