Struct synac::state::State [] [src]

pub struct State {
    pub channels: HashMap<usize, Channel>,
    pub users: HashMap<usize, User>,
}

A struct that remembers stuff previous packets have informed about

Fields

Methods

impl State
[src]

[src]

Create new state

[src]

Update the state with packet

[src]

Search for a private channel with user

[src]

Search for the recipient in a private channel

[src]

Search for the recipient in a private channel. If the channel isn't private, it returns the first user it can find that has a special mode in that channel. So you should probably make sure it's private first.

Trait Implementations

impl Default for State
[src]

[src]

Returns the "default value" for a type. Read more