pub struct ParameterGate<T>(/* private fields */);Expand description
A gate can be configured via a (mutable) parameter to either forward all received messages (open), or drop all received messages (closed).
Trait Implementations§
Source§impl<T> Codelet for ParameterGate<T>
impl<T> Codelet for ParameterGate<T>
Source§type Status = ParameterGateStatus
type Status = ParameterGateStatus
Status code used to indicate health of codelet
Source§type Config = ParameterGateConfig
type Config = ParameterGateConfig
Type used for configuration
Source§type Rx = DoubleBufferRx<T>
type Rx = DoubleBufferRx<T>
Type holding all receiving (RX) endpoints
Source§type Tx = DoubleBufferTx<T>
type Tx = DoubleBufferTx<T>
Type holding all transmitting (TX) endpoints
Source§fn step(
&mut self,
cx: Context<'_, Self>,
rx: &mut Self::Rx,
tx: &mut Self::Tx,
) -> Result<ParameterGateStatus>
fn step( &mut self, cx: Context<'_, Self>, rx: &mut Self::Rx, tx: &mut Self::Tx, ) -> Result<ParameterGateStatus>
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> Freeze for ParameterGate<T>
impl<T> RefUnwindSafe for ParameterGate<T>where
T: RefUnwindSafe,
impl<T> Send for ParameterGate<T>where
T: Send,
impl<T> Sync for ParameterGate<T>where
T: Sync,
impl<T> Unpin for ParameterGate<T>where
T: Unpin,
impl<T> UnwindSafe for ParameterGate<T>where
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