Using Field Attributes with serde.rs | by João Henrique Machado Silva | The Polyglot Programmer | Jul, 2021

by Nitikesh Pattanayak
148 views
A+A-
Reset

Serde is a generic framework for serializing and deserializing Rust data structures efficiently.

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,
}

You may also like

Leave a Reply

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

-
00:00
00:00
Update Required Flash plugin
-
00:00
00:00
Verified by MonsterInsights