Enum screeps_api::websocket::parsing::ScreepsMessage
[−]
[src]
pub enum ScreepsMessage<'a> {
AuthFailed,
AuthOk {
new_token: Token,
},
ServerTime {
time: u64,
},
ServerProtocol {
protocol: u32,
},
ServerPackage {
package: u32,
},
ChannelUpdate {
update: ChannelUpdate<'a>,
},
Other(Cow<'a, str>),
}A parsed message.
Variants
AuthFailedAuthentication failed.
AuthOkAuthentication successful!
Fields of AuthOk
new_token: Token | The new token to store. |
ServerTimeOn initial connection, the server reports its own time.
Fields of ServerTime
time: u64 | The server time. |
ServerProtocolOn initial connection, the server reports a protocol version.
Fields of ServerProtocol
protocol: u32 | The protocol version. |
ServerPackageOn initial connection, the server reports a "package" number.
Fields of ServerPackage
package: u32 | I'm not sure what this means at all. |
ChannelUpdateAn update on one of the channels.
Fields of ChannelUpdate
update: ChannelUpdate<'a> | The update. |
Other(Cow<'a, str>)Another kind of message.
Methods
impl ScreepsMessage<'static>[src]
fn parse<T: AsRef<str> + ?Sized>(message: &T) -> Self[src]
Parses the internal message from a SockJS message into a meaningful type.
Trait Implementations
impl<'a> Clone for ScreepsMessage<'a>[src]
fn clone(&self) -> ScreepsMessage<'a>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more