[][src]Struct matrix_bot_api::Room

pub struct Room {
    pub id: String,
    pub avatar: Option<String>,
    pub name: Option<String>,
    pub topic: Option<String>,
    pub alias: Option<String>,
    pub guest_can_join: bool,
    pub world_readable: bool,
    pub n_members: i32,
    pub members: HashMap<String, Member, RandomState>,
    pub notifications: i32,
    pub highlight: i32,
    pub messages: Vec<Message>,
    pub membership: RoomMembership,
    pub direct: bool,
    pub prev_batch: Option<String>,
    pub typing_users: Vec<Member>,
    pub power_levels: HashMap<String, i32, RandomState>,
}

Fields

id: Stringavatar: Option<String>name: Option<String>topic: Option<String>alias: Option<String>guest_can_join: boolworld_readable: booln_members: i32members: HashMap<String, Member, RandomState>notifications: i32highlight: i32messages: Vec<Message>membership: RoomMembershipdirect: boolprev_batch: Option<String>typing_users: Vec<Member>power_levels: HashMap<String, i32, RandomState>

Hashmap with the room users power levels the key will be the userid and the value will be the level

Methods

impl Room[src]

pub fn new(id: String, membership: RoomMembership) -> Room[src]

pub fn from_sync_response(
    response: &SyncResponse,
    userid: &str,
    baseu: &Url
) -> Vec<Room>
[src]

pub fn add_receipt_from_json(&mut self, events: Vec<&Value>)[src]

pub fn add_receipt_from_fully_read(&mut self, uid: &str, evid: &str)[src]

Trait Implementations

impl Clone for Room[src]

impl Debug for Room[src]

impl Default for Room[src]

impl<'de> Deserialize<'de> for Room[src]

impl From<PublicRoomsChunk> for Room[src]

impl PartialEq<Room> for Room[src]

impl Serialize for Room[src]

Auto Trait Implementations

impl RefUnwindSafe for Room

impl Send for Room

impl Sync for Room

impl Unpin for Room

impl UnwindSafe for Room

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err