pub enum WriteError {
UnknownWire {
key: String,
known: Vec<String>,
},
TypeMismatch {
slot: String,
expected: PortType,
got: PortType,
},
CoordinateSlot {
slot: String,
},
ConstSlot {
slot: String,
},
}Expand description
Error returned by Dataflow::set_wire_idx /
Dataflow::set_wire when the typed-write contract at the
composition-substrate boundary cannot be satisfied.
Per composition_substrate.md axiom S4, “T1 + T2 ensure writes are type-checked at the boundary” — the typed-write API rejects writes whose Value variant doesn’t match the declared slot port type, after first attempting auto-adapter healing. This error names the rejection reason.
Variants§
UnknownWire
The wire key did not resolve to a known input slot. Carries the name that was looked up; for indexed writes the index is reported instead.
Fields
known: Vec<String>The kernel’s input slots, as
Kernel::input_names reports them and in the same order,
coordinates included. Empty only where the writer does not
have the list.
Coordinates are in it although writing one by name is
Self::CoordinateSlot rather than a success: a caller who
mistyped a coordinate meant a name this kernel has, and is
not helped by a list that leaves it out. The exact match is
what the other variant is for. Every engine answers alike,
and a host can check the list against input_names.
TypeMismatch
The value’s port type did not match the slot’s declared port type and no auto-adapter exists to heal the mismatch. Both expected and provided port types are reported for diagnostic clarity.
Fields
CoordinateSlot
The slot is a coordinate, which advances through
set_inputs rather than being written by name or index.
Writing one here would put the coordinate prefix out of
step with the values a pull is about to read.
ConstSlot
The slot holds a const binding’s value, which only
Kernel::init writes. A const is fixed for the life of the
kernel; to change it, write the inputs it reads and initialize.
Trait Implementations§
Source§impl Clone for WriteError
impl Clone for WriteError
Source§impl Debug for WriteError
impl Debug for WriteError
Source§impl Display for WriteError
impl Display for WriteError
Source§impl Error for WriteError
impl Error for WriteError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for WriteError
impl PartialEq for WriteError
impl StructuralPartialEq for WriteError
Auto Trait Implementations§
impl Freeze for WriteError
impl RefUnwindSafe for WriteError
impl Send for WriteError
impl Sync for WriteError
impl Unpin for WriteError
impl UnsafeUnpin for WriteError
impl UnwindSafe for WriteError
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more