Struct TopicJoin

Source
pub struct TopicJoin<T> { /* private fields */ }
Expand description

Join has multiple input channels and a single output channel. All messages received on any input channel are sent to the output channel. There is no particular guarantee on the order of messages on the output channel.

Trait Implementations§

Source§

impl<T> Codelet for TopicJoin<T>
where T: Clone + Send + Sync,

Source§

type Status = DefaultStatus

Status code used to indicate health of codelet
Source§

type Config = TopicJoinConfig

Type used for configuration
Source§

type Rx = TopicJoinRx<Message<T>>

Type holding all receiving (RX) endpoints
Source§

type Tx = DoubleBufferTx<Message<WithTopic<T>>>

Type holding all transmitting (TX) endpoints
Source§

fn build_bundles(_: &Self::Config) -> (Self::Rx, Self::Tx)

Constructs channel bundles
Source§

fn step( &mut self, _: &Context<'_, Self>, rx: &mut Self::Rx, tx: &mut Self::Tx, ) -> Outcome

Step is executed periodically after the codelet is started and while it is not paused.
Source§

fn start( &mut self, _cx: &Context<'_, Self>, _rx: &mut Self::Rx, _tx: &mut Self::Tx, ) -> Result<Self::Status, Report>

Start is guaranteed to be called first. Start may be called again after stop was called.
Source§

fn stop( &mut self, _cx: &Context<'_, Self>, _rx: &mut Self::Rx, _tx: &mut Self::Tx, ) -> Result<Self::Status, Report>

Stop is guaranteed to be called at the end if start was called.
Source§

fn pause(&mut self) -> Result<Self::Status, Report>

Pause may be called to suspend stepping.
Source§

fn resume(&mut self) -> Result<Self::Status, Report>

Resume is called to resume stepping. Note that stop may also be called while the codelet is paused to stop the codelet completely instead of resuming stepping.
Source§

impl<T> Default for TopicJoin<T>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<T> Freeze for TopicJoin<T>

§

impl<T> RefUnwindSafe for TopicJoin<T>
where T: RefUnwindSafe,

§

impl<T> Send for TopicJoin<T>
where T: Send,

§

impl<T> Sync for TopicJoin<T>
where T: Sync,

§

impl<T> Unpin for TopicJoin<T>
where T: Unpin,

§

impl<T> UnwindSafe for TopicJoin<T>
where T: 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<C> Instantiate for C
where C: Codelet + Default,

Source§

fn instantiate<S>(name: S, config: <C as Codelet>::Config) -> CodeletInstance<C>
where S: Into<String>,

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<C> IntoInstance for C
where C: Codelet,

Source§

fn into_instance<S>( self, name: S, config: <C as Codelet>::Config, ) -> CodeletInstance<C>
where S: Into<String>,

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.