[#1] Blog metadata can be stored using serde.
Created the initial blog data, posts and authors, and allows it to be stored using serde.
This commit is contained in:
32
src/adventurer.rs
Normal file
32
src/adventurer.rs
Normal file
@ -0,0 +1,32 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
|
||||
/// Represents an author or contributor of a tale.
|
||||
///
|
||||
/// An `Adventurer` contains identifying and descriptive information
|
||||
/// such as their name, handle, profile URL, image, and a short blurb.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Adventurer
|
||||
{
|
||||
/// The full name of the adventurer.
|
||||
pub name: String,
|
||||
|
||||
/// A unique handle or username for the adventurer (e.g., used in URLs or mentions).
|
||||
pub handle: String,
|
||||
|
||||
/// A link to the adventurer's profile (e.g., personal website, GitHub, etc.).
|
||||
pub profile: String,
|
||||
|
||||
/// A URL or path to an image representing the adventurer (e.g., avatar or portrait).
|
||||
pub image: String,
|
||||
|
||||
/// A short descriptive text or tagline about the adventurer.
|
||||
pub blurb: String
|
||||
}
|
||||
|
||||
|
||||
|
||||
impl Adventurer
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user