[][src]Struct screeps_api::websocket::RoomUpdate

pub struct RoomUpdate {
    pub game_time: Option<u32>,
    pub info: RoomUpdateInfo,
    pub objects: Vec<(String, Value)>,
    pub flags: Vec<Flag>,
    pub visual: Option<String>,
    pub users: Option<HashMap<String, Value>>,
    // some fields omitted
}

Update for detailed room information.

Fields

game_time: Option<u32>

The game time when this update was created.

info: RoomUpdateInfo

Information on the room "mode".

objects: Vec<(String, Value)>

All room objects in the room, represented as serde_json::Value.

This would be parsed into a concrete enum for each type, but room updates by their nature are incremental - and this includes the "type" field.

These values can be applied as updates to the RoomObject type.

flags: Vec<Flag>

All of the subscribed user's flags in this room.

This will always be present when there are flags, even if no flags have changed.

visual: Option<String>

The logged in user's visuals for this room.

Represented by a series of json objects separated by \n.

TODO: parse this further.

users: Option<HashMap<String, Value>>

Detailed information on all users that have things in this room.

Parse using RoomUserInfo.

Trait Implementations

impl Clone for RoomUpdate[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for RoomUpdate[src]

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

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,