pub trait ExactCompiler: Backend {
// Required method
fn compile_exact(
&self,
graph: &GeometryGraph,
root: NodeId,
options: &ExecutionOptions,
) -> GeomResult<ExactBRep>;
// Provided methods
fn scratch_requirement(&self) -> ScratchRequirement { ... }
fn output_bound(&self) -> OutputBound { ... }
fn compile_exact_batch_into(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
destination: &mut Vec<ExactBRep>,
) -> GeomResult<()> { ... }
fn compile_exact_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
) -> GeomResult<Vec<ExactBRep>> { ... }
}Expand description
Backend able to lower graph roots to exact B-reps, or refuse.
The contract is deliberately narrow. An implementation returns
axiolid_contracts::GeomError::UnsupportedInput naming the unsupported
node family when it cannot preserve exactness. It must never substitute a
tessellation: callers wanting triangles ask
axiolid_mesh_compile_contract::MeshCompiler instead.
Required Methods§
Sourcefn compile_exact(
&self,
graph: &GeometryGraph,
root: NodeId,
options: &ExecutionOptions,
) -> GeomResult<ExactBRep>
fn compile_exact( &self, graph: &GeometryGraph, root: NodeId, options: &ExecutionOptions, ) -> GeomResult<ExactBRep>
Compile one root to an exact B-rep, or refuse.
Provided Methods§
Sourcefn scratch_requirement(&self) -> ScratchRequirement
fn scratch_requirement(&self) -> ScratchRequirement
Scratch needed beyond the graph and the produced results.
Defaults to unbounded: an unaudited compiler is treated as unbudgetable rather than silently assumed cheap.
Sourcefn output_bound(&self) -> OutputBound
fn output_bound(&self) -> OutputBound
Outputs produced per requested root.
Sourcefn compile_exact_batch_into(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
destination: &mut Vec<ExactBRep>,
) -> GeomResult<()>
fn compile_exact_batch_into( &self, graph: &GeometryGraph, roots: &[NodeId], options: &ExecutionOptions, destination: &mut Vec<ExactBRep>, ) -> GeomResult<()>
Compile roots into a caller-provided buffer.
Results append in root order. Implementations override this seam to share a per-request exact-result cache across roots.
Sourcefn compile_exact_batch(
&self,
graph: &GeometryGraph,
roots: &[NodeId],
options: &ExecutionOptions,
) -> GeomResult<Vec<ExactBRep>>
fn compile_exact_batch( &self, graph: &GeometryGraph, roots: &[NodeId], options: &ExecutionOptions, ) -> GeomResult<Vec<ExactBRep>>
Compile roots as an ordered exact-result batch.