Skip to main content

FeatureResult

Struct FeatureResult 

Source
pub struct FeatureResult {
Show 24 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 boolean_auto_target: 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>, pub solid_aliases: Vec<(String, String)>,
}

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.

§boolean_auto_target: Option<String>

The solid a no-target boolean ran into: the part’s ONLY solid, which a feature whose boolean.operation is UNION/SUBTRACT/INTERSECT with no targets uses as if the user had picked it (owner 2026-11-07; features::common::implicit_boolean_target). Decided at every evaluation and never written into the document, so the document stays “auto” and follows a rename. None for every result that booleaned an explicit target, or none. The feature panel shows it as Auto: <name>. 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: bool

True 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.

§solid_aliases: Vec<(String, String)>

Former solid names this feature’s result still answers to, as (legacy, canonical): SceneMap::resolve_solid reads legacy as the resident solid named canonical. An Offset Shell that replaces its source keeps the source’s name (since 2026-11-07); a document saved before that names the shell {target}_{featureId} in later features, and the alias keeps every such reference resolving. Same INTERNAL #[serde(skip)] side-channel; a produced name, so it versions like one for the history cache.

Implementations§

Source§

impl FeatureResult

Source

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.

Source

pub fn error( id: impl Into<String>, feature_type: impl Into<String>, message: impl Into<String>, ) -> Self

A hard failure. Halts the history loop.

Source

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.

Source

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.

Source

pub fn pass_through( id: impl Into<String>, feature_type: impl Into<String>, ) -> Self

A non-solid construction feature (datum/plane/sketch/spline/port/helix): a descriptor pass-through with no resident handle. The loop continues.

Source

pub fn not_yet_migrated( id: impl Into<String>, feature_type: impl Into<String>, ) -> Self

A solid-producing (or no-kernel) feature not yet ported to Rust. Halts the loop with a clear message — replaced when a fan-out agent implements the feature’s features/<feat>.rs.

Trait Implementations§

Source§

impl Clone for FeatureResult

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FeatureResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Serialize for FeatureResult

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more