pub struct Source<T, F> { /* private fields */ }Expand description
A codelet which calls a callback each tick and publishes what it returns
Implementations§
Trait Implementations§
Source§impl<T, F> Codelet for Source<T, F>
impl<T, F> Codelet for Source<T, F>
Source§type Status = DefaultStatus
type Status = DefaultStatus
Status code used to indicate health of codelet
Source§type Tx = DoubleBufferTx<T>
type Tx = DoubleBufferTx<T>
Type holding all transmitting (TX) endpoints
Source§fn step(
&mut self,
_: &Context<'_, Self>,
_: &mut Self::Rx,
tx: &mut Self::Tx,
) -> Outcome
fn step( &mut self, _: &Context<'_, Self>, _: &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>
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.
Auto Trait Implementations§
impl<T, F> Freeze for Source<T, F>where
F: Freeze,
impl<T, F> RefUnwindSafe for Source<T, F>where
F: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, F> Send for Source<T, F>
impl<T, F> Sync for Source<T, F>
impl<T, F> Unpin for Source<T, F>
impl<T, F> UnwindSafe for Source<T, F>where
F: UnwindSafe,
T: 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