Crate facet_deserialize

Crate facet_deserialize 

Source
Expand description

§facet-deserialize

Coverage Status crates.io documentation MIT/Apache-2.0 licensed Discord

§facet-deserialize

An event-based approach to facet-deserialize

§Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

…along with corporate sponsors:

AWS Zed Depot

…without whom this work could not exist.

§Special thanks

The facet logo was drawn by Misiasart.

§License

Licensed under either of:

at your option.

Structs§

DeserError
A deserialization error, associated with a specific input and location.
DeserErrorMessage
A wrapper type for displaying deser error messages
NextData
Carries the current parsing state and the in-progress value during deserialization. This bundles the mutable context that must be threaded through parsing steps.
Span
A span in the input, with a start position and length
Spanned
A value of type T annotated with its Span

Enums§

DeserErrorKind
An error kind for JSON parsing.
Expectation
Expected next input token or structure during deserialization.
Instruction
Instructions guiding the parsing flow, indicating the next expected action or token.
Outcome
Outcome of parsing the next input element.
PopReason
Reasons for popping a state from the stack, indicating why a scope is ended.
Scalar
A scalar value used during deserialization. u64 and i64 are separated because i64 doesn’t fit in u64, but having u64 is a fast path for 64-bit architectures — no need to go through u128 / i128 for everything
ValueReason
Reasons for expecting a value, reflecting the current parse context.

Traits§

Format
Trait defining a deserialization format. Provides the next parsing step based on current state and expected input.
Spannable
Trait for types that can be annotated with a Span.

Functions§

deserialize
Deserialize a value of type T from raw input bytes using format F.
deserialize_wip
Deserializes a working-in-progress value into a fully materialized heap value. This function drives the parsing loop until the entire input is consumed and the value is complete.

Type Aliases§

NextResult
The result of advancing the parser: updated state and parse outcome or error.
Pos
Position in the input (byte index)