Using Field Attributes with serde.rs
use serde::{Serialize, Deserialize};
/// Represents the Discord information as
/// returned from the API
///
#[derive(Debug, Serialize, Deserialize)]
pub struct DiscordUser {
pub photo_url: String,
pub username: String,
pub id: String,
}...
hashblog.thepolyglotprogrammer.com8 min read