[][src]Enum rustimate_core::RequestMessage

pub enum RequestMessage {
    Ping {
        v: i64,
    },
    GetVersion,
    JoinSession {
        id: Uuid,
    },
    UpdateSession {
        name: String,
        choices: Vec<String>,
    },
    UpdateSelf {
        name: String,
    },
    SetPollTitle {
        id: Uuid,
        title: String,
    },
    SetPollStatus {
        poll: Uuid,
        status: PollStatus,
    },
    SubmitVote {
        poll: Uuid,
        vote: String,
    },
}

Sent from client to server, this shared model is used for all server communication

Variants

Ping

Fields of Ping

v: i64
GetVersion
JoinSession

Fields of JoinSession

id: Uuid
UpdateSession

Fields of UpdateSession

name: Stringchoices: Vec<String>
UpdateSelf

Fields of UpdateSelf

name: String
SetPollTitle

Fields of SetPollTitle

id: Uuidtitle: String
SetPollStatus

Fields of SetPollStatus

poll: Uuidstatus: PollStatus
SubmitVote

Fields of SubmitVote

poll: Uuidvote: String

Methods

impl RequestMessage[src]

pub fn from_json(s: &str) -> Result<Self>[src]

pub fn to_json(&self) -> Result<String>[src]

pub fn from_binary(b: &[u8]) -> Result<Self>[src]

pub fn to_binary(&self) -> Result<Vec<u8>>[src]

Trait Implementations

impl Debug for RequestMessage[src]

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

impl Serialize for RequestMessage[src]

Auto Trait Implementations

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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,