pub struct NullWireSource;Expand description
Empty WireSource — every get returns None, names is
empty. Used as the default for ExecCtx::new so callers that
don’t yet have a kernel handle don’t need to construct a
real implementation. Migration call sites switch to
ExecCtx::with_wires when they own a kernel reference (see
SRD-68 Push 2 and beyond).
Trait Implementations§
Source§impl WireSource for NullWireSource
impl WireSource for NullWireSource
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 Freeze for NullWireSource
impl RefUnwindSafe for NullWireSource
impl Send for NullWireSource
impl Sync for NullWireSource
impl Unpin for NullWireSource
impl UnsafeUnpin for NullWireSource
impl UnwindSafe for NullWireSource
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