roster: Finish to document this module.

This commit is contained in:
Emmanuel Gil Peyrot 2018-07-31 23:47:55 +02:00
parent 0d9d24ffca
commit 170f87ef0f

View file

@ -4,18 +4,37 @@
// 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;
use iq::{IqGetPayload, IqSetPayload, IqResultPayload}; use iq::{IqGetPayload, IqSetPayload, IqResultPayload};
generate_elem_id!(Group, "group", ROSTER); generate_elem_id!(
/// Represents a group a contact is part of.
Group, "group", ROSTER
);
generate_attribute!(Subscription, "subscription", { generate_attribute!(
/// The state of your mutual subscription with a contact.
Subscription, "subscription", {
/// The user doesnt have any subscription to this contacts presence,
/// and neither does this contact.
None => "none", None => "none",
/// Only this contact has a subscription with you, not the opposite.
From => "from", From => "from",
/// Only you have a subscription with this contact, not the opposite.
To => "to", To => "to",
/// Both you and your contact are subscribed to each others presence.
Both => "both", Both => "both",
/// In a roster set, this asks the server to remove this contact item
/// from your roster.
Remove => "remove", Remove => "remove",
}, Default = None); }, Default = None
);
generate_element!( generate_element!(
/// Contact from the users contact list. /// Contact from the users contact list.