pub struct ExchangeCore<CB, F> { /* private fields */ }
Expand description
An exchange between multiple observers by data
Implementations§
Source§impl<CB, F> ExchangeCore<CB, F>where
CB: LengthPreservingContainerBuilder,
CB::Container: DrainContainer,
for<'a> F: FnMut(&<CB::Container as DrainContainer>::Item<'a>) -> u64,
impl<CB, F> ExchangeCore<CB, F>where
CB: LengthPreservingContainerBuilder,
CB::Container: DrainContainer,
for<'a> F: FnMut(&<CB::Container as DrainContainer>::Item<'a>) -> u64,
Sourcepub fn new_core(func: F) -> ExchangeCore<CB, F>
pub fn new_core(func: F) -> ExchangeCore<CB, F>
Allocates a new Exchange
pact from a distribution function.
Source§impl<C, F> ExchangeCore<CapacityContainerBuilder<C>, F>
impl<C, F> ExchangeCore<CapacityContainerBuilder<C>, F>
Sourcepub fn new(func: F) -> ExchangeCore<CapacityContainerBuilder<C>, F>
pub fn new(func: F) -> ExchangeCore<CapacityContainerBuilder<C>, F>
Allocates a new Exchange
pact from a distribution function.
Trait Implementations§
Source§impl<C, F> Debug for ExchangeCore<C, F>
impl<C, F> Debug for ExchangeCore<C, F>
Source§impl<T: Timestamp, CB, H> ParallelizationContract<T, <CB as ContainerBuilder>::Container> for ExchangeCore<CB, H>where
CB: ContainerBuilder<Container: DrainContainer> + for<'a> PushInto<<CB::Container as DrainContainer>::Item<'a>>,
CB::Container: Send + ContainerBytes,
for<'a> H: FnMut(&<CB::Container as DrainContainer>::Item<'a>) -> u64 + 'static,
impl<T: Timestamp, CB, H> ParallelizationContract<T, <CB as ContainerBuilder>::Container> for ExchangeCore<CB, H>where
CB: ContainerBuilder<Container: DrainContainer> + for<'a> PushInto<<CB::Container as DrainContainer>::Item<'a>>,
CB::Container: Send + ContainerBytes,
for<'a> H: FnMut(&<CB::Container as DrainContainer>::Item<'a>) -> u64 + 'static,
Source§type Pusher = Exchange<T, LogPusher<Box<dyn Push<Message<T, <CB as ContainerBuilder>::Container>>>>, DrainContainerDistributor<CB, H>>
type Pusher = Exchange<T, LogPusher<Box<dyn Push<Message<T, <CB as ContainerBuilder>::Container>>>>, DrainContainerDistributor<CB, H>>
Type implementing
Push
produced by this pact.Auto Trait Implementations§
impl<CB, F> Freeze for ExchangeCore<CB, F>where
F: Freeze,
impl<CB, F> RefUnwindSafe for ExchangeCore<CB, F>where
F: RefUnwindSafe,
CB: RefUnwindSafe,
impl<CB, F> Send for ExchangeCore<CB, F>
impl<CB, F> Sync for ExchangeCore<CB, F>
impl<CB, F> Unpin for ExchangeCore<CB, F>
impl<CB, F> UnwindSafe for ExchangeCore<CB, F>where
F: UnwindSafe,
CB: UnwindSafe,
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> 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 more