Since we tie the versions rather tightly, we have to release the entire bunch in order to allow people to upgrade to rxml 0.14.
111 lines
5.3 KiB
Text
111 lines
5.3 KiB
Text
Version NEXT:
|
|
|
|
Version 0.4.0, release 2026-06-10:
|
|
* Breaking
|
|
- Removed the `non-pedantic` feature and made the behaviour the default.
|
|
- Added the `pedantic` feature, opting into the previous default
|
|
behaviour of rejecting unknown attributes and children.
|
|
* Changes
|
|
- Fix some Clippy warnings
|
|
- Fix build with minidom and without std (!661)
|
|
- Fix no_std build
|
|
* Added
|
|
- xso::from_bytes_with_options and xso::from_reader_with_options to allow
|
|
passing custom parser configuration.
|
|
|
|
Version 0.3.0, release 2025-10-28:
|
|
* Changes
|
|
- Bump minidom dep to 0.18, which has breaking changes.
|
|
|
|
Version 0.2.0, released 2025-09-17:
|
|
0000-00-00 Jonas Schäfer <jonas@zombofant.net>
|
|
* Breaking
|
|
- The methods of `TextCodec<T>` now have `&self` receivers. This also
|
|
implies that `#[xml(text(codec = ..))]` now takes expressions instead
|
|
of type paths.
|
|
|
|
Because all implementations provided by `xso` were in fact unit
|
|
structs, this should not change most invocations, with one exception:
|
|
The type argument of `Base64` was removed. Replace all `Base64<Foo>`
|
|
references with `Base64.filtered(Foo)` to update your code.
|
|
|
|
This change overall allows for more flexibility in the implementation
|
|
of text codecs.
|
|
- `xml:lang` attributes are now silently discarded during
|
|
deserialisation unless captured by `#[xml(attribute = "xml:lang")]` or
|
|
equivalent. This is because `xml:lang` is special as per
|
|
XML 1.0 § 2.12 and it is generally preferable to allow it to occur
|
|
anywhere in the document.
|
|
- The `FromXml::from_events` and `FromEventsBuilder::feed` functions
|
|
gained an additional argument to support `xml:lang` inheritance.
|
|
* Added
|
|
- Support for child elements in derive macros. Child elements may also
|
|
be wrapped in Option or Box or in containers like Vec or HashSet.
|
|
- Support for overriding the names of the types generated by the derive
|
|
macros.
|
|
- Support for deriving FromXml and AsXml on enums.
|
|
- Support for extracting data from child elements without intermediate
|
|
structs.
|
|
- Support for collecting all unknown children in a single field as
|
|
collection of `minidom::Element`, or one unknown child as a
|
|
`minidom::Element`, or zero or one unknown children as an
|
|
`Option<minidom::Element>`.
|
|
- Support for "transparent" structs (newtype-like patterns for XSO).
|
|
- FromXmlText and AsXmlText are now implemented for jid::NodePart,
|
|
jid::DomainPart, and jid::ResourcePart (!485)
|
|
- Support for optional child elements, the presence of which are
|
|
translated into a boolean (`#[xml(flag)]`).
|
|
- Generic TextCodec implementation for all base64 engines provided by
|
|
the base64 crate (if the `base64` feature is enabled).
|
|
- New `codec` field on `attribute` meta, to support decoding and
|
|
encoding using any `TextCodec`.
|
|
- Support for `no_std` usage (the alloc crate is required, though).
|
|
- Add a PrintRawXml helper struct to be able to display raw xml, useful
|
|
for debug logs.
|
|
- Support to selectively discard attributes or text content during
|
|
parsing (!552).
|
|
- Implement `AsXml` and `FromXml` for serde_json::Value` behind
|
|
`serde_json` feature.
|
|
- Support for a post-deserialization callback function call. (!553)
|
|
- Support for correctly inheriting `xml:lang` values throughout the
|
|
XML document.
|
|
- `xso::convert_via_fromstr_and_display`, a declarative macro to provide
|
|
`AsXmlText` and `FromXmlText` implementations based on the standard
|
|
library's `Display` and `FromStr` traits.
|
|
- `AsXmlDyn`, a dyn-compatible variant of `AsXml` (!573).
|
|
- `FromXml::xml_name_matcher()` and related types, which allow `FromXml`
|
|
implementors to provide cacheable hints to callers about which XML
|
|
elements are valid candidates for parsing (!573).
|
|
- `Xso<dyn Trait>`, a Box-like struct which can hold a dynamically-typed
|
|
XSO, alongside related traits and (declarative) macros (!573).
|
|
- `XsoVec<dyn Trait>`, a container which can hold dynamically-typed
|
|
XSOs (!573).
|
|
* Changes
|
|
- Generated AsXml iterator and FromXml builder types are now
|
|
doc(hidden), to not clutter hand-written documentation with auto
|
|
generated garbage (something certain big tech companies could take
|
|
an example of, honestly).
|
|
- Fixed bug where putting an attribute field below any non-attribute
|
|
field in a struct definition would cause a compile-time error when
|
|
deriving `AsXml`.
|
|
- Update rxml dependency to 0.13.
|
|
- xso now rejects conflicting `#[xml(attribute)]` (and `#[xml(lang)]`)
|
|
specifications at compile time.
|
|
- Deprecate `try_from_element` in favour of `transform`.
|
|
|
|
Version 0.1.2:
|
|
2024-07-26 Jonas Schäfer <jonas@zombofant.net>
|
|
* Added
|
|
- FromXmlText and AsXmlText are now implemented on char.
|
|
* Fixed
|
|
- Docs build on docs.rs now shows feature-gated items.
|
|
|
|
Version 0.1.1:
|
|
2024-07-25 Maxime “pep” Buquet <pep@bouah.net>
|
|
* Added
|
|
- Import various text codecs from parsers: FixedHex, ColonSeparatedHex,
|
|
EmptyAsError.
|
|
|
|
Version 0.1.0:
|
|
2024-07-25 Jonas Schäfer <jonas@zombofant.net>
|
|
* Initial release of this crate
|