Skip to main content

Crate ferrox_types

Crate ferrox_types 

Source
Expand description

§Ferrox Types (ferrox-types)

ferrox-types provides fundamental domain primitives and wrapper types used throughout Ferrox applications, including validated Pagination parameters and type-safe PublicId structures.

§Design Rationale

Primitive obsessions (e.g. passing raw u64 or String everywhere) lead to bugs, accidental ID confusion, and invalid query limits. ferrox-types introduces strongly typed abstractions that validate their invariants upon construction.

§Key Features

  • 📄 Pagination: Invariant-enforced page size limit (limit > 0) and page offset helper.
  • 🏷️ PublicId: Strongly typed entity identifier wrapper preventing accidental ID substitution.

Structs§

CreateUserDto
Example of a Validatable DTO using the validator crate (like class-validator in TS) It is also exported to TypeScript automatically!
Pagination
A strongly typed Pagination primitive. It guarantees that limit and offset are always valid (e.g. limit > 0).

Functions§

setup