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

Authentication failed.

Authentication successful!

Fields of AuthOk

The new token to store.

On initial connection, the server reports its own time.

Fields of ServerTime

The server time.

On initial connection, the server reports a protocol version.

Fields of ServerProtocol

The protocol version.

On initial connection, the server reports a "package" number.

Fields of ServerPackage

I'm not sure what this means at all.

An update on one of the channels.

Fields of ChannelUpdate

The update.

Another kind of message.

Methods

impl ScreepsMessage<'static>
[src]

[src]

Parses the internal message from a SockJS message into a meaningful type.

Trait Implementations

impl<'a> Clone for ScreepsMessage<'a>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for ScreepsMessage<'a>
[src]

[src]

Formats the value using the given formatter.