Crate hwpforge_foundation

Crate hwpforge_foundation 

Source
Expand description

HwpForge Foundation: primitive types for the HwpForge ecosystem.

This crate sits at the bottom of the dependency graph. It provides raw-material value types used by every other HwpForge crate:

§Design Principles

  • Zero-cost newtypes: repr(transparent) on value wrappers
  • Type safety: phantom-branded indices prevent mixing
  • Compile-time guarantees: const size assertions
  • No unsafe code: #![deny(unsafe_code)]

Re-exports§

pub use color::Color;
pub use enums::Alignment;
pub use enums::ApplyPageType;
pub use enums::ArcType;
pub use enums::ArrowSize;
pub use enums::ArrowType;
pub use enums::BookmarkType;
pub use enums::BorderLineType;
pub use enums::BreakType;
pub use enums::CurveSegmentType;
pub use enums::DropCapStyle;
pub use enums::EmbossType;
pub use enums::EmphasisType;
pub use enums::EngraveType;
pub use enums::FieldType;
pub use enums::FillBrushType;
pub use enums::Flip;
pub use enums::GradientType;
pub use enums::GutterType;
pub use enums::HeadingType;
pub use enums::ImageFillMode;
pub use enums::Language;
pub use enums::LineSpacingType;
pub use enums::NumberFormatType;
pub use enums::OutlineType;
pub use enums::PageNumberPosition;
pub use enums::PatternType;
pub use enums::RefContentType;
pub use enums::RefType;
pub use enums::RestartType;
pub use enums::ShadowType;
pub use enums::ShowMode;
pub use enums::StrikeoutShape;
pub use enums::TextBorderType;
pub use enums::TextDirection;
pub use enums::UnderlineType;
pub use enums::VerticalPosition;
pub use enums::WordBreakType;
pub use error::ErrorCode;
pub use error::ErrorCodeExt;
pub use error::FoundationError;
pub use error::FoundationResult;
pub use ids::FontId;
pub use ids::StyleName;
pub use ids::TemplateName;
pub use index::BorderFillIndex;
pub use index::CharShapeIndex;
pub use index::FontIndex;
pub use index::Index;
pub use index::NumberingIndex;
pub use index::ParaShapeIndex;
pub use index::StyleIndex;
pub use index::TabIndex;
pub use units::HwpUnit;
pub use units::Insets;
pub use units::Point;
pub use units::Rect;
pub use units::Size;

Modules§

color
BGR color type matching the HWP specification.
enums
Core enums used throughout HWP document processing.
error
Error types for the HwpForge Foundation crate.
ids
String-based identifiers for fonts, templates, and styles.
index
Branded (phantom-typed) index types for type-safe collection access.
units
HWP measurement unit system.