Struct Multiplex

Source
pub struct Multiplex<In, Out, Entry>
where Entry: PipelineEntry<In, Out> + Send,
{ /* private fields */ }
Expand description

A meta pipeline entry that distributes the work of a PipelineEntry across multiple threads

Implementations§

Source§

impl<In, Out, Entry> Multiplex<In, Out, Entry>
where Entry: PipelineEntry<In, Out> + Send + Copy,

Build a Multiplex by copying an existing PipelineEntry

Note: this is only applicable where the PipelineEntry implements Copy, which due to Rust #28229 is not true of closures

Source

pub fn from(entry: Entry, workers: usize) -> Self

Source§

impl<In, Out, Entry> Multiplex<In, Out, Entry>
where Entry: PipelineEntry<In, Out> + Send,

Source

pub fn new(entries: Vec<Entry>) -> Self

Trait Implementations§

Source§

impl<In: Debug, Out: Debug, Entry> Debug for Multiplex<In, Out, Entry>
where Entry: PipelineEntry<In, Out> + Send + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<In, Out, Entry> PipelineEntry<In, Out> for Multiplex<In, Out, Entry>
where Entry: PipelineEntry<In, Out> + Send + 'static, In: Send + 'static, Out: Send + 'static,

Source§

fn process<I: IntoIterator<Item = In>>(self, tx: Sender<Out>, rx: I)

Auto Trait Implementations§

§

impl<In, Out, Entry> Freeze for Multiplex<In, Out, Entry>

§

impl<In, Out, Entry> RefUnwindSafe for Multiplex<In, Out, Entry>
where In: RefUnwindSafe, Out: RefUnwindSafe, Entry: RefUnwindSafe,

§

impl<In, Out, Entry> Send for Multiplex<In, Out, Entry>
where In: Send, Out: Send,

§

impl<In, Out, Entry> Sync for Multiplex<In, Out, Entry>
where In: Sync, Out: Sync, Entry: Sync,

§

impl<In, Out, Entry> Unpin for Multiplex<In, Out, Entry>
where In: Unpin, Out: Unpin, Entry: Unpin,

§

impl<In, Out, Entry> UnwindSafe for Multiplex<In, Out, Entry>
where In: UnwindSafe, Out: UnwindSafe, Entry: 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 = 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.