rust-discord-activity 0.1.0

A lightweight library to control Discord Rich Presence
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use serde::Serialize;

#[derive(Serialize, Debug)]
pub struct Party {
    #[serde(skip_serializing_if = "Option::is_none")]
    id: Option<String>,

    #[serde(skip_serializing_if = "Option::is_none")]
    size: Option<(i8, i8)>,
}

impl Party {
    pub fn new(id: Option<String>, size: Option<(i8, i8)>) -> Party {
        Self { id, size }
    }
}