Add ability to serialize Serde types to quick_xml::writer::Writer

Aperta
#886 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

Start by reading issue #611 and the Serde serialization documentation to understand how the current serializer writes to std::io::Write and how quick_xml events are produced. Then trace the serialization and writer entry points to assess how event streaming could support middleware. Done means Serde types can stream events to a writer so filtering and transformations can be applied without a serialize/parse round trip.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement serde

While the documentation talks about "writers" in the context of serializing a Serde type, this is really about the std::io::Write API, not about the quick_xml writer itself.

If I could stream events to a writer, then middleware become possible. Use cases include filtering events so that only part of the document gets written to bytes and applying transformations to output like XML canonicalization.

It also helps unlock to namespace normalization middleware; right now Serde serializers are locked into hardcoded prefixes, but a transformation stage could exist that rewrites these events to target different prefixes and this is important in canonicalization which unfortunately is sensitive to specific prefixes.

This looks to be the inverse of this issue:

https://github.com/tafia/quick-xml/issues/611

It's possible to build such pipelines now I think, but it requires a serialize/parse round trip in order to glue things together.

Lingua principale
Rust
Stelle
1.6k
Fork
299
Merge medio
2g 4h
PR unite (30g)
9

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tafia/quick-xml

Tutte le issue di tafia/quick-xml

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.