Skip to main content

Crate whichtime_sys

Crate whichtime_sys 

Source
Expand description

Lower-level parsing engine for the whichtime project.

whichtime-sys exposes the lower-level Rust parser engine that powers the higher-level [whichtime] crate and the project’s FFI bindings. The main entry point is WhichTime, which coordinates a locale-specific parser pipeline:

  1. Pre-scan the input for date-related tokens.
  2. Run matching parsers for the active locale.
  3. Post-process matches with refiners.
  4. Return ParsedResult values or the first parsed date.

Supported locales: en, de, es, fr, it, ja, nl, pt, ru, sv, uk, and zh.

Re-exports§

pub use components::Component;
pub use components::ComponentFlags;
pub use components::FastComponents;
pub use context::ParsingContext;
pub use dictionaries::CasualDateType;
pub use dictionaries::CasualTimeType;
pub use dictionaries::Locale;
pub use dictionaries::RelativeModifier;
pub use error::Error;
pub use error::Result;
pub use results::ParsedResult;
pub use results::ReferenceWithTimezone;
pub use types::Meridiem;
pub use types::Weekday;

Modules§

components
Option C: Array-based components with bitflags
context
Parsing context
dictionaries
Option B: Compile-time PHF dictionaries
error
Error types for whichtime-sys
parsers
Parser infrastructure and locale-specific implementations.
refiners
Refiner infrastructure and implementations
results
Parsing results
scanner
Option A: Aho-Corasick based multi-pattern scanner with multi-locale support
types
Common types for whichtime-sys

Structs§

Configuration
Locale-specific parser configuration.
WhichTime
The main natural-language date parser.

Functions§

create_configuration_for_locale
Build the default parser configuration for a locale.