2 releases
0.18.2 | Aug 25, 2021 |
---|---|
0.18.1 | Aug 13, 2021 |
#14 in #xmpp
745KB
16K
SLoC
A crate parsing common XMPP elements into Rust structures.
Each module implements the TryFrom<Element>
trait, which takes a
minidom Element
and returns a Result
whose value is Ok
if the
element parsed correctly, Err(error::Error)
otherwise.
The returned structure can be manipuled as any Rust structure, with each
field being public. You can also create the same structure manually, with
some having new()
and with_*()
helper methods to create them.
Once you are happy with your structure, you can serialise it back to an
Element
, using either From
or Into<Element>
, which give you what
you want to be sending on the wire.
Dependencies
~4.5MB
~61K SLoC