pub struct FeatureResult {Show 22 fields
pub persistent_data: Option<Value>,
pub id: String,
pub feature_type: String,
pub added: Vec<AddedSolid>,
pub removed: Vec<String>,
pub error: Option<String>,
pub refusal: Option<KernelRefusal>,
pub fulfilment: Option<Fulfilment>,
pub refused_step: Option<String>,
pub unresolved: Vec<String>,
pub notes: Vec<String>,
pub approximations: Vec<Approximation>,
pub reused: bool,
pub profiles: Vec<(String, SketchProfile)>,
pub frames: Vec<(String, Frame)>,
pub axes: Vec<(String, Axis)>,
pub paths: Vec<(String, Vec<NurbsCurve>)>,
pub path_segment_names: Vec<(String, Vec<Option<String>>)>,
pub path_segment_axes: Vec<(String, Vec<Option<Axis>>)>,
pub points: Vec<(String, ScenePoint)>,
pub ports: Vec<(String, PortRecord)>,
pub components: Vec<ComponentRecord>,
}Fields§
§persistent_data: Option<Value>§id: String§feature_type: String§added: Vec<AddedSolid>§removed: Vec<String>Names of prior solids this feature consumed/superseded (removed from the scene-map; their handles are freed by the loop).
error: Option<String>Set on a hard failure. execute_history records it and HALTS the
remaining features (mirrors the abort-on-error loop). Never a panic.
refusal: Option<KernelRefusal>The TYPED refusal behind error, when the producer that refused minted
one (KernelRefusal: a closed class, the stage, the same text). error
is always that refusal’s message verbatim, so a consumer that only
reads text sees nothing new; one that dispatches on the class reads it
here. None on success and on a refusal from a producer that still
returns text.
fulfilment: Option<Fulfilment>What a SUCCESSFUL feature did with what it was asked, when that is not
“everything, exactly”: the references it applied and the ones it
rejected, each with why. None on a refusal and on a feature that did
everything it was asked. A feature that proceeds on the subset of its
selection that resolved says so HERE, typed, instead of only in
unresolved (which stays populated for the rename hint). This is a
success stating what it did, not a refusal carrying a partial result —
the payload the 2026-09-11 survey rejected.
refused_step: Option<String>Which named motion STEP of a feature refused: Transform Face records
"rotation" or "translation" (features::transform_face::REFUSED_STEP_*)
for a refusal from either motion, alone or in rotate-then-translate.
None for every other result, including a Transform Face refused before
any motion ran. The refusal’s class is the step’s own; this says which
step it was, which no class can. Additive: absent when None.
unresolved: Vec<String>reference_selection names this feature could not resolve against the
scene-map. NOT an error/halt — the caller runs a snapshot-repair pass and
re-dispatches (migration-plan Stage 5 gate).
notes: Vec<String>What the kernel REPAIRED while building this feature, in the words of the repair that made it. A repair changes the answer the lane returns — the self-crossing fixer drops material and re-trims its neighbours — so it is never silent: the feature that ran it says so here, and the case gate records it per case. Empty on every feature that repaired nothing, which is nearly all of them.
approximations: Vec<Approximation>MEASURED approximations a SUCCESSFUL result carries
(crate::Approximation): the result stands, and each entry says by
how much and why it is not exact — today, an imported body whose shell
closes over the pcurve fit bar (import.shell_closure), with the bound
that puts on its volume. Distinct from notes (a REPAIR changed the
answer), from fulfilment (what was done of what was asked) and from
refusal (the result does not stand). The case runner records them per
feature and will not read a volume oracle as correct inside the bound.
Empty on nearly every feature.
reused: boolTrue when this result was REPLAYED from the incremental history cache (the feature and everything it references are unchanged since the last run). The handles are the same resident solids — the caller can skip re-tessellation.
profiles: Vec<(String, SketchProfile)>Sketch profiles this feature produced (a SKETCH feature emits one under
its name; solid features emit none). INTERNAL side-channel: #[serde(skip)]
so it never crosses the wasm boundary to the caller — SceneMap::apply ingests it
into scene.profiles for downstream profile-consumers (extrude/revolve/…).
frames: Vec<(String, Frame)>Named plane frames this feature produced (DATUM emits three, PLANE one).
Same INTERNAL #[serde(skip)] side-channel — ingested into scene.frames
so a later SKETCH can resolve its plane by name, fully headless.
axes: Vec<(String, Axis)>Named axis lines this feature produced (a SKETCH emits one per line
geometry). Same INTERNAL #[serde(skip)] side-channel — ingested into
scene.axes so a later revolve/sweep can resolve its axis by name.
paths: Vec<(String, Vec<NurbsCurve>)>Named path chains this feature produced (a SKETCH publishes its ordered
open/closed geometry chain). Same INTERNAL #[serde(skip)] side-channel —
ingested into scene.paths for sweep/path_sweep/rib trajectory resolution.
path_segment_names: Vec<(String, Vec<Option<String>>)>The SOURCE NAME of each curve in a published path chain, parallel to the
matching Self::paths entry ({sketchId}:G{gid} for a sketch segment,
None for a curve with no name behind it). Same INTERNAL #[serde(skip)]
side-channel — ingested into scene.path_segment_names so a multi-segment
consumer (the SWEEP) can name the geometry each PATH SEGMENT built after
that segment, instead of after its position in the chain.
path_segment_axes: Vec<(String, Vec<Option<Axis>>)>The SCREW AXIS of each curve in a published path chain, parallel to the
matching Self::paths entry: Some for a curve its builder KNOWS is a
helix about that axis (the HELIX feature), None for everything else.
Same INTERNAL #[serde(skip)] side-channel — ingested into
scene.path_segment_axes so the SWEEP’s pathAlign can carry a profile by
the helix’s own screw motion rather than by a rotation-minimizing frame,
which rolls away from it by the helix’s integrated torsion.
points: Vec<(String, ScenePoint)>Named world points this feature produced (a SKETCH publishes every point
as {sketchId}:P{pid}, construction flag included — see ScenePoint).
Same side-channel — ingested into scene.points for hole-center /
placement resolution and drawn by the committed-sketch display.
ports: Vec<(String, PortRecord)>Harness ports this feature produced (a PORT feature emits one under its
id). Same INTERNAL #[serde(skip)] side-channel — ingested into
scene.ports for spline attachments and the wire-harness tail.
components: Vec<ComponentRecord>Component records this feature produced (an ACOMP feature emits one per
instance; its members ride added like any solids). Same INTERNAL
#[serde(skip)] side-channel — ingested into scene.components so the
component surface (component.rs) resolves against the live scene.
Implementations§
Source§impl FeatureResult
impl FeatureResult
Sourcepub fn empty(id: impl Into<String>, feature_type: impl Into<String>) -> Self
pub fn empty(id: impl Into<String>, feature_type: impl Into<String>) -> Self
An empty successful result (no solids, no error) — the shape a non-solid pass-through feature returns.
Sourcepub fn error(
id: impl Into<String>,
feature_type: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn error( id: impl Into<String>, feature_type: impl Into<String>, message: impl Into<String>, ) -> Self
A hard failure. Halts the history loop.
Sourcepub fn note_partial_resolution(&mut self, requested: &[String])
pub fn note_partial_resolution(&mut self, requested: &[String])
The feature proceeded on the references that resolved and skipped the
ones in unresolved: record that as a typed partial fulfilment.
requested is the selection as the document names it; applied is
what remains after the misses. Nothing is recorded when every reference
resolved. Call it at the point the feature DECIDES to proceed, not at
resolution: a feature that no-ops or refuses on a miss has no partial.
Sourcepub fn refuse(
id: impl Into<String>,
feature_type: impl Into<String>,
refusal: impl Into<FeatureRefusal>,
) -> Self
pub fn refuse( id: impl Into<String>, feature_type: impl Into<String>, refusal: impl Into<FeatureRefusal>, ) -> Self
A hard failure from either kind of producer: error carries the text
(the refusal’s own message, verbatim, when it is typed) and refusal
the class and stage when there is one.