API reference

aster_ui::svg_transform

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 SVG 1.1 transform-attribute import. This is not a CSS/XML parser.

Structs

structaster_ui::svg_transform::ImportError

pub struct ImportError { /* see fields */ }

Byte offset into the supplied UTF-8 string, always at a character boundary.

Public fields

fieldtype
kindImportErrorKind
offsetusize

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

structaster_ui::svg_transform::ImportLimits

pub struct ImportLimits { /* see fields */ }

Cold input/work limits. Hard ceilings: 1 MiB, 4096 operations, 256 bytes/number.

Methods

  • fn new(bytes: usize, operations: usize) -> Result<Self, ImportError> — Zero is valid: it admits only empty input/zero operations respectively.
  • fn bytes(self) -> usize
  • fn operations(self) -> usize

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

structaster_ui::svg_transform::ImportedTransform

pub struct ImportedTransform { /* see fields */ }

Immutable collapsed transform and source operation count. No source lease.

Methods

  • fn parse(text: &str, limits: ImportLimits) -> Result<Self, ImportError> — Parse completely before returning. No accepted scene/layout is modified. Lists post-multiply: translate(10) scale(2) maps x=3 to x=16.
  • fn matrix(self) -> Affine2D
  • fn operations(self) -> usize

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

Enums

enumaster_ui::svg_transform::ImportErrorKind

pub enum ImportErrorKind { InvalidLimits, ByteLimit, OperationLimit, NumberLimit, Syntax, UnknownFunction, Arity, NumericalRange }

Variants

  • InvalidLimits
  • ByteLimit
  • OperationLimit
  • NumberLimit
  • Syntax
  • UnknownFunction
  • Arity
  • NumericalRange

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