stanza_id: Document this module.
This commit is contained in:
parent
170f87ef0f
commit
cacafe7ea1
1 changed files with 23 additions and 9 deletions
|
@ -4,18 +4,32 @@
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
|
#![deny(missing_docs)]
|
||||||
|
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
|
|
||||||
generate_element!(StanzaId, "stanza-id", SID,
|
generate_element!(
|
||||||
attributes: [
|
/// Gives the identifier a service has stamped on this stanza, often in
|
||||||
|
/// order to identify it inside of [an archive](../mam/index.html).
|
||||||
|
StanzaId, "stanza-id", SID,
|
||||||
|
attributes: [
|
||||||
|
/// The id associated to this stanza by another entity.
|
||||||
id: String = "id" => required,
|
id: String = "id" => required,
|
||||||
by: Jid = "by" => required,
|
|
||||||
]);
|
|
||||||
|
|
||||||
generate_element!(OriginId, "origin-id", SID,
|
/// The entity who stamped this stanza-id.
|
||||||
attributes: [
|
by: Jid = "by" => required,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
generate_element!(
|
||||||
|
/// A hack for MUC before version 1.31 to track a message which may have
|
||||||
|
/// its 'id' attribute changed.
|
||||||
|
OriginId, "origin-id", SID,
|
||||||
|
attributes: [
|
||||||
|
/// The id this client set for this stanza.
|
||||||
id: String = "id" => required,
|
id: String = "id" => required,
|
||||||
]);
|
]
|
||||||
|
);
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
Loading…
Reference in a new issue