1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
use crate::templates::Twitter;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
pub struct Metadata {
    language_code: String,
    country_code: String,
    charset: String,
    description: String,
    project: String,
    author: String,
    twitter: Twitter,
    home_url: String,
    keywords: Vec<String>,
    theme_color: String,
    social_image: String,
}

impl Metadata {
    #[allow(clippy::too_many_arguments)]
    #[must_use]
    pub fn new(
        language_code: String,
        country_code: String,
        charset: String,
        description: String,
        project: String,
        author: String,
        twitter: Twitter,
        home_url: String,
        keywords: Vec<String>,
        theme_color: String,
        social_image: String,
    ) -> Self {
        Self {
            language_code,
            country_code,
            charset,
            description,
            project,
            author,
            twitter,
            home_url,
            keywords,
            theme_color,
            social_image,
        }
    }
}