leo_span

Module span_json

Source
Expand description

Provides custom serialize/deserialize implementations for Span.

Functionsยง

  • Custom deserialization to enable removing spans from enums.
  • The AST contains a few tuple-like enum variants that contain spans. #[derive(Serialize, Deserialize)] outputs these fields as anonymous mappings, which makes them difficult to remove from the JSON AST. This function provides a custom serialization that maps the keyword span to the span information.