API reference

aster_ui::svg_path

Pre-1.0: signatures are not frozen. Generated from rustdoc JSON of the compiled crate; rustdoc JSON format version 60. Only public items are listed.

Bounded, complete path-data parsing into owned binary64 source commands. General elliptical arcs are retained, never silently flattened or dropped.

Structs

structaster_ui::svg_path::EllipticalArc

pub struct EllipticalArc { /* see fields */ }

Endpoint-parameterized SVG arc, retained before render-time radius correction.

Public fields

fieldtype
radii[f64; 2]
x_axis_rotationf64
large_arcbool
sweepbool
end[f64; 2]

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

structaster_ui::svg_path::ImportError

pub struct ImportError { /* see fields */ }

Public fields

fieldtype
kindImportErrorKind
offsetusize

Trait implementations: Clone, Copy, Debug, Display, Eq, Error, PartialEq, StructuralPartialEq

structaster_ui::svg_path::ImportLimits

pub struct ImportLimits { /* see fields */ }

Methods

  • fn new(bytes: usize, commands: usize, contours: usize) -> Result<Self, ImportError>
  • fn bytes(self) -> usize
  • fn commands(self) -> usize
  • fn contours(self) -> usize

Trait implementations: Clone, Copy, Debug, Default, Eq, PartialEq, StructuralPartialEq

structaster_ui::svg_path::ImportedPath

pub struct ImportedPath { /* see fields */ }

No source-string or backend lease. All coordinates remain f64.

Methods

  • fn parse(text: &str, limits: ImportLimits) -> Result<Self, ImportError> — Two bounded scans reserve the exact admitted output length once. The first scan validates all syntax, derived coordinates and work budgets.
  • fn elements(&self) -> &[PathElement]
  • fn contours(&self) -> usize
  • fn source_bytes(&self) -> usize
  • fn reserved_bytes(&self) -> usize — Owned command allocation only; excludes the fixed object and later geometry.
  • fn to_geometry(&self, rule: VectorFillRule, command_budget: usize) -> Result<VectorGeometry, ImportError> — Cold bridge retaining native binary64 commands and endpoint arcs. Curves are admitted/tessellated later at the actual output scale and placement. No accepted path is partially rendered or silently truncated.

Trait implementations: Debug

structaster_ui::svg_path::PathElement

pub struct PathElement { /* see fields */ }

Methods

  • fn command(self) -> PathCommand
  • fn offset(self) -> usize
  • fn source_verb(self) -> Option<char> — Effective SVG verb, preserving case and shorthand identity. An extra moveto coordinate pair has the effective verb L/l. Synthetic moves after closepath have no source verb. This is provenance, not an animation API.
  • fn is_explicit(self) -> bool — Whether this element starts at an explicit command letter in the source.

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq

Enums

enumaster_ui::svg_path::ImportErrorKind

pub enum ImportErrorKind { InvalidLimits, ByteLimit, CommandLimit, ContourLimit, NumberLimit, Syntax, NumericalRange, Allocation, ArcRenderingUnavailable, Geometry }

Variants

  • InvalidLimits
  • ByteLimit
  • CommandLimit
  • ContourLimit
  • NumberLimit
  • Syntax
  • NumericalRange
  • Allocation
  • ArcRenderingUnavailable
  • Geometry

Trait implementations: Clone, Copy, Debug, Eq, PartialEq, StructuralPartialEq

enumaster_ui::svg_path::PathCommand

pub enum PathCommand { MoveTo, LineTo, QuadraticTo, CubicTo, ArcTo, Close }

Variants

  • MoveTo
  • LineTo
  • QuadraticTo
  • CubicTo
  • ArcTo
  • Close

Trait implementations: Clone, Copy, Debug, PartialEq, StructuralPartialEq