mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
roster: Document most structs and their fields.
This commit is contained in:
parent
56a66f8c4b
commit
a04c395122
1 changed files with 16 additions and 0 deletions
|
@ -23,11 +23,19 @@ generate_attribute!(Subscription, "subscription", {
|
||||||
Remove => "remove",
|
Remove => "remove",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/// Contact from the user’s contact list.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub struct Item {
|
pub struct Item {
|
||||||
|
/// JID of this contact.
|
||||||
pub jid: Jid,
|
pub jid: Jid,
|
||||||
|
|
||||||
|
/// Name of this contact.
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
|
||||||
|
/// Subscription status of this contact.
|
||||||
pub subscription: Option<Subscription>,
|
pub subscription: Option<Subscription>,
|
||||||
|
|
||||||
|
/// Groups this contact is part of.
|
||||||
pub groups: Vec<Group>,
|
pub groups: Vec<Group>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,9 +82,17 @@ impl From<Item> for Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// The contact list of the user.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct Roster {
|
pub struct Roster {
|
||||||
|
/// Version of the contact list.
|
||||||
|
///
|
||||||
|
/// This is an opaque string that should only be sent back to the server on
|
||||||
|
/// a new connection, if this client is storing the contact list between
|
||||||
|
/// connections.
|
||||||
pub ver: Option<String>,
|
pub ver: Option<String>,
|
||||||
|
|
||||||
|
/// List of the contacts of the user.
|
||||||
pub items: Vec<Item>,
|
pub items: Vec<Item>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue