cu29::simulation

Enum CuTaskCallbackState

Source
pub enum CuTaskCallbackState<'cl, I, O>
where I: CuMsgPack<'cl>, O: CuMsgPack<'cl>,
{ New(Option<ComponentConfig>), Start, Preprocess, Process(I, O), Postprocess, Stop, _Phantom(PhantomData<&'cl ()>), }
Expand description

This is the state that will be passed to the simulation support to hook into the lifecycle of the tasks.

Variants§

§

New(Option<ComponentConfig>)

Callbacked when a task is created. It gives you the opportunity to adapt the sim to the given config.

§

Start

Callbacked when a task is started.

§

Preprocess

Callbacked when a task is getting called on pre-process.

§

Process(I, O)

Callbacked when a task is getting called on process. I and O are the input and output messages of the task. if this is a source task, I will be CuMsg<()> if this is a sink task, O will be CuMsg<()>

§

Postprocess

Callbacked when a task is getting called on post-process.

§

Stop

Callbacked when a task is stopped.

§

_Phantom(PhantomData<&'cl ()>)

Auto Trait Implementations§

§

impl<'cl, I, O> Freeze for CuTaskCallbackState<'cl, I, O>
where I: Freeze, O: Freeze,

§

impl<'cl, I, O> RefUnwindSafe for CuTaskCallbackState<'cl, I, O>

§

impl<'cl, I, O> Send for CuTaskCallbackState<'cl, I, O>
where I: Send, O: Send,

§

impl<'cl, I, O> Sync for CuTaskCallbackState<'cl, I, O>
where I: Sync, O: Sync,

§

impl<'cl, I, O> Unpin for CuTaskCallbackState<'cl, I, O>
where I: Unpin, O: Unpin,

§

impl<'cl, I, O> UnwindSafe for CuTaskCallbackState<'cl, I, O>
where I: UnwindSafe, O: 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.
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T