mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
lib: Improve the wording of the docstring.
This commit is contained in:
parent
87af0f3615
commit
fd31e691af
1 changed files with 13 additions and 4 deletions
17
src/lib.rs
17
src/lib.rs
|
@ -1,10 +1,19 @@
|
||||||
//! A crate parsing common XMPP elements into Rust structures.
|
//! A crate parsing common XMPP elements into Rust structures.
|
||||||
//!
|
//!
|
||||||
//! Each module implements the `TryFrom<&minidom::Element>` trait, which takes
|
//! Each module implements the [`TryFrom<Element>`] trait, which takes a minidom
|
||||||
//! a minidom `Element` reference and returns a `Result`.
|
//! [`Element`] reference and returns a `Result` whose value is `Ok` if the
|
||||||
|
//! element parsed correctly, `Err(error::Error)` otherwise.
|
||||||
//!
|
//!
|
||||||
//! Parsed structs can then be manipulated manually, and must be serialised
|
//! The returned structure can be manipuled as any Rust structure, with each
|
||||||
//! back before being sent over the wire.
|
//! 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.
|
||||||
|
//!
|
||||||
|
//! [`TryFrom<Element>`]: ../try_from/trait.TryFrom.html
|
||||||
|
//! [`Element`]: ../minidom/element/struct.Element.html
|
||||||
|
|
||||||
// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
||||||
// Copyright (c) 2017 Maxime “pep” Buquet <pep+code@bouah.net>
|
// Copyright (c) 2017 Maxime “pep” Buquet <pep+code@bouah.net>
|
||||||
|
|
Loading…
Reference in a new issue