pub enum WriteOutcome {
Stored,
NoSlot,
TypeMismatch {
reason: String,
},
Coordinate {
reason: String,
},
Const {
reason: String,
},
}Expand description
Result of a WireSource::write call.
Stored means the value landed on a real input slot in the
underlying kernel and is visible to subsequent pulls.
NoSlot means the kernel’s program has no input slot named
name. Under KernelOptLevel::Release this is the
closure-binding economy’s DCE signal — nothing in the body
referenced the name, so the value is silently dropped. Under
KernelOptLevel::Diagnostic every magic extern and
result-binding LHS gets a slot, so NoSlot indicates a
genuinely-unknown name (caller error or a name outside the
kernel’s scope).
Callers don’t need to branch on the outcome to maintain
correctness — the kernel either has a slot for the name or it
doesn’t, and NoSlot is the same as “the workload doesn’t
reference this value.” Diagnostics (debug_nodes_enabled(),
audit log) can log the outcome to make DCE visible.
Variants§
Stored
Value written to a real input slot.
NoSlot
No input slot named name in this kernel’s program.
TypeMismatch
The slot exists but the value is not of the slot’s declared
PortType and polydat’s conversion catalog has no conversion
to it (or the conversion failed). The typed-write contract
rejects this rather than silently corrupting downstream reads;
the reason field carries the polydat-side diagnostic for
surfacing to the operator.
Coordinate
The slot is a coordinate. Coordinates advance with the cycle
(set_inputs), never by a named write, so the kernel refuses
the write to keep the coordinate prefix in step with the cycle
a pull is about to read. reason is polydat’s diagnostic.
Const
The slot holds a const’s captured value, which only kernel
initialization writes: a const changes when the inputs it reads
change and the kernel is re-initialized, never by a write to its
own slot. reason is polydat’s diagnostic.
Trait Implementations§
Source§impl Clone for WriteOutcome
impl Clone for WriteOutcome
Source§impl Debug for WriteOutcome
impl Debug for WriteOutcome
impl Eq for WriteOutcome
Source§impl From<HostWriteError> for WriteOutcome
impl From<HostWriteError> for WriteOutcome
Source§fn from(e: HostWriteError) -> Self
fn from(e: HostWriteError) -> Self
Source§impl PartialEq for WriteOutcome
impl PartialEq for WriteOutcome
impl StructuralPartialEq for WriteOutcome
Auto Trait Implementations§
impl Freeze for WriteOutcome
impl RefUnwindSafe for WriteOutcome
impl Send for WriteOutcome
impl Sync for WriteOutcome
impl Unpin for WriteOutcome
impl UnsafeUnpin for WriteOutcome
impl UnwindSafe for WriteOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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