pub struct TryMap<A, B, F>(/* private fields */);Expand description
Trait Implementations§
Source§impl<A, B, F> Op for TryMap<A, B, F>
impl<A, B, F> Op for TryMap<A, B, F>
Source§const ACTIVATION: Activation = Activation::NONE
const ACTIVATION: Activation = Activation::NONE
How this op is scheduled, declared statically so the engines can read
it at wiring time rather than infer it. See
Activation.Source§type Cfg = F
type Cfg = F
Construction-time configuration, closures included — a
map’s F
is its Cfg. Built at wiring, owned by the engine, handed to every
lifecycle function by &mut. () for an op that needs none.Source§type State = ()
type State = ()
Per-node mutable state carried between cycles: boxed by the
interpreted engine, a stack local in a compiled runner.
() for a
stateless op.Source§type In<'a> = (&'a A,)
type In<'a> = (&'a A,)
The typed inputs for one cycle — upstream values by reference, plus a
bool tick flag wherever the op needs to know which input fired
((&T, bool)). A tuple for a fixed-arity op, a slice for a variadic
one, () for a source. The engine assembles it; ops never reach
upstream themselves.Source§fn cycle(
cfg: &mut F,
_state: &mut (),
input: (&A,),
_ctx: &mut Ctx<'_>,
) -> Result<Tick<B>>
fn cycle( cfg: &mut F, _state: &mut (), input: (&A,), _ctx: &mut Ctx<'_>, ) -> Result<Tick<B>>
Run one cycle: the op’s whole semantics, and the only function that
must be written. Returns
Tick::Value to produce and propagate,
Tick::Silent to update the value slot without waking downstream,
or Tick::Quiet to do neither. Err aborts the run with node
context.Source§fn start(
cfg: &mut Self::Cfg,
state: &mut Self::State,
ctx: &mut Ctx<'_>,
) -> Result<()>
fn start( cfg: &mut Self::Cfg, state: &mut Self::State, ctx: &mut Ctx<'_>, ) -> Result<()>
Called once before the first cycle. Sources use this to schedule
their first activation; IO ops open resources here.
Auto Trait Implementations§
impl<A, B, F> Freeze for TryMap<A, B, F>
impl<A, B, F> RefUnwindSafe for TryMap<A, B, F>
impl<A, B, F> Send for TryMap<A, B, F>
impl<A, B, F> Sync for TryMap<A, B, F>
impl<A, B, F> Unpin for TryMap<A, B, F>
impl<A, B, F> UnsafeUnpin for TryMap<A, B, F>
impl<A, B, F> UnwindSafe for TryMap<A, B, F>
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