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

Abierto
#886 3 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
rust
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
1.6k
Forks
299
Merge medio
2 d 4 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de tafia/quick-xml

Todos los issues de tafia/quick-xml

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.