Expand description

Logo by Misiasart
Thanks to all individual and corporate sponsors, without whom this work could not exist:
§facet-deserialize
An event-based approach to facet-deserialize
§License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Structs§
- Deser
Error - A deserialization error, associated with a specific input and location.
- Deser
Error Message - A wrapper type for displaying deser error messages
- Next
Data - 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 itsSpan
Enums§
- Deser
Error Kind - 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
andi64
are separated becausei64
doesn’t fit inu64
, but havingu64
is a fast path for 64-bit architectures — no need to go throughu128
/i128
for everything - Value
Reason - 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 formatF
. - 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§
- Next
Result - The result of advancing the parser: updated state and parse outcome or error.
- Pos
- Position in the input (byte index)