pub struct Item {
pub affiliation: Option<Affiliation>,
pub jid: Option<BareJid>,
pub nick: Option<String>,
pub role: Option<Role>,
pub actor: Option<Actor>,
pub reason: Option<Reason>,
}Expand description
An item representing a user in a room.
Fields§
§affiliation: Option<Affiliation>The affiliation of this user with the room.
MUST be set when request/modifying affiliations.
jid: Option<BareJid>The real JID of this user, if you are allowed to see it.
nick: Option<String>The current nickname of this user.
role: Option<Role>The current role of this user or selector for users with this role
actor: Option<Actor>The actor affected by this item.
reason: Option<Reason>A reason for this item.
Implementations§
Source§impl Item
impl Item
Sourcepub fn with_actor(self, actor: Actor) -> Item
pub fn with_actor(self, actor: Actor) -> Item
Set an actor for this Item
Sourcepub fn with_reason<S: Into<String>>(self, reason: S) -> Item
pub fn with_reason<S: Into<String>>(self, reason: S) -> Item
Set a reason for this Item
Sourcepub fn with_affiliation(self, affiliation: Affiliation) -> Item
pub fn with_affiliation(self, affiliation: Affiliation) -> Item
Set affiliation for this Item
Trait Implementations§
Source§impl AsXml for Item
impl AsXml for Item
Source§impl FromXml for Item
impl FromXml for Item
Source§fn from_events(
name: QName,
attrs: AttrMap,
ctx: &Context<'_>,
) -> Result<Self::Builder, FromEventsError>
fn from_events( name: QName, attrs: AttrMap, ctx: &Context<'_>, ) -> Result<Self::Builder, FromEventsError>
Attempt to initiate the streamed construction of this struct from XML. Read more
Source§fn xml_name_matcher() -> XmlNameMatcher<'static>
fn xml_name_matcher() -> XmlNameMatcher<'static>
Return a predicate which determines if
Self may be parsed from
a given XML element. Read moreimpl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more