pub struct KernelWires<'a>(pub &'a dyn Kernel);Expand description
Read-only WireSource over a kernel of any engine: the names a scope
lookup answers (KernelLookup — a const’s value, an input, a folded
value), as the ScopeKernel impl below does for the interpreter.
Computed outputs that need a pull are not covered; CycleWires is
the surface that pulls. What an adapter’s canonical kernel offers a
wrap-time reader.
Tuple Fields§
§0: &'a dyn KernelTrait Implementations§
Source§impl WireSource for KernelWires<'_>
impl WireSource for KernelWires<'_>
Source§fn get(&self, name: &str) -> Option<Value>
fn get(&self, name: &str) -> Option<Value>
Look up
name in this kernel’s scope. Returns the current
value (cloned, owned) or None when the name is not
declared here. Callers do not retry against another kernel
— a None is the resolution result, full stop.Source§fn names(&self) -> Box<dyn Iterator<Item = String> + '_>
fn names(&self) -> Box<dyn Iterator<Item = String> + '_>
Iterate declared names. Order is implementation-defined.
Used by validators and diagnostic renderers.
Source§fn write(&self, _name: &str, _value: Value) -> WriteOutcome
fn write(&self, _name: &str, _value: Value) -> WriteOutcome
Write
value into the named input slot of this kernel.
Returns WriteOutcome::Stored when the slot exists and
the value was written, WriteOutcome::NoSlot when the
kernel’s program has no input slot named name. Read moreSource§fn reset(&self, _name: &str) -> WriteOutcome
fn reset(&self, _name: &str) -> WriteOutcome
Reset the named input slot to its DECLARED initial value —
the author’s identity element for that wire. The capture
layer uses this for min/max-of-nothing (SRD-93-era fold
totality): an empty measurement restores the wire to its
declared unit rather than parking
Value::None on a typed
slot, where every downstream consumer would have to be
None-aware. Default impl returns NoSlot (read-only
sources have nothing to reset).Auto Trait Implementations§
impl<'a> !RefUnwindSafe for KernelWires<'a>
impl<'a> !UnwindSafe for KernelWires<'a>
impl<'a> Freeze for KernelWires<'a>
impl<'a> Send for KernelWires<'a>
impl<'a> Sync for KernelWires<'a>
impl<'a> Unpin for KernelWires<'a>
impl<'a> UnsafeUnpin for KernelWires<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more