pub enum CuTaskCallbackState<'cl, I, O>{
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>
impl<'cl, I, O> RefUnwindSafe for CuTaskCallbackState<'cl, I, O>where
I: RefUnwindSafe,
O: RefUnwindSafe,
impl<'cl, I, O> Send for CuTaskCallbackState<'cl, I, O>
impl<'cl, I, O> Sync for CuTaskCallbackState<'cl, I, O>
impl<'cl, I, O> Unpin for CuTaskCallbackState<'cl, I, O>
impl<'cl, I, O> UnwindSafe for CuTaskCallbackState<'cl, I, O>where
I: UnwindSafe,
O: 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