Crate deluxe_core

source ·
Expand description

Deluxe Core

Core functions and traits shared between deluxe and deluxe_macros.

This crate is used by deluxe_macros to parse its own attributes. Code generated by its derive macros also references items from this crate re-exported into deluxe. The functions in parse_helpers are used internally by the derive macros, but can also be used for convenience when manually implementing any of the parsing traits.

See the documentation for the deluxe crate for a high-level overview of how Deluxe works.

Modules

  • Utility functions for parse trait implementations.
  • Additional helper functions for validating after parsing.
  • Custom parsing helpers for #[deluxe(with = ...)].

Macros

  • Appends an error if some attributes are present, but not all of them, automatically casting and stringifying field names.
  • Generates a module for parsing a collection using `#[deluxe(with = …)].
  • Generates a module for parsing a map collection using `#[deluxe(with = …)].
  • Generates a module for parsing an optional value using `#[deluxe(with = …)].
  • Appends an error if more than one given attribute is present, automatically casting and stringifying field names.
  • Parses a ParseMetaItem following a name, using a custom parse module.

Structs

  • A wrapper for a list of errors. Can be empty.
  • An iterator containing all the errors in an Errors.
  • A value for a boolean named field that can only be a name (set) or omitted (unset).
  • A region of source code, along with macro expansion information.
  • A wrapper for adding a Span to an arbitrary value.

Enums

  • The context a meta item parser is operating in.

Traits

Type Definitions

  • The error type for parsers.
  • The result of a parse method.