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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
use super::*;
#[derive(Debug, Clone)]
pub struct SummaryLargeImage {
strings: Vec<String>,
}
impl SummaryLargeImage {
pub fn builder() -> Self {
Self {
strings: vec![create_card("summary_large_image")],
}
}
#[inline]
pub fn site(mut self, site: &str) -> Self {
self.strings.push(create_site(site));
self
}
#[inline]
pub fn site_id(mut self, content: &str) -> Self {
self.strings.push(create_site_id(content));
self
}
#[inline]
pub fn creator_id(mut self, content: &str) -> Self {
self.strings.push(create_creator_id(content));
self
}
#[inline]
pub fn creator(mut self, content: &str) -> Self {
self.strings.push(create_creator(content));
self
}
#[inline]
pub fn desc(mut self, content: &str) -> Self {
self.strings.push(create_desc(content));
self
}
#[inline]
pub fn title(mut self, content: &str) -> Self {
self.strings.push(create_title(content));
self
}
#[inline]
pub fn image(mut self, content: &str) -> Self {
self.strings.push(create_image(content));
self
}
#[inline]
pub fn image_alt(mut self, content: &str) -> Self {
self.strings.push(create_image_alt(content));
self
}
}
impl TwitterCard for SummaryLargeImage {
#[inline]
fn build(self) -> String {
self.strings.join("\n")
}
}