aboutsummaryrefslogtreecommitdiff
path: root/src/models/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/text.rs')
-rw-r--r--src/models/text.rs36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/models/text.rs b/src/models/text.rs
index f7ea2b6..b960b6d 100644
--- a/src/models/text.rs
+++ b/src/models/text.rs
@@ -25,35 +25,35 @@ pub enum TextColor {
}
/// Rich text annotations
-/// See https://developers.notion.com/reference/rich-text#annotations
+/// See <https://developers.notion.com/reference/rich-text#annotations>
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
-struct Annotations {
- bold: Option<bool>,
- code: Option<bool>,
- color: Option<TextColor>,
- italic: Option<bool>,
- strikethrough: Option<bool>,
- underline: Option<bool>,
+pub struct Annotations {
+ pub bold: Option<bool>,
+ pub code: Option<bool>,
+ pub color: Option<TextColor>,
+ pub italic: Option<bool>,
+ pub strikethrough: Option<bool>,
+ pub underline: Option<bool>,
}
/// Properties common on all rich text objects
-/// See https://developers.notion.com/reference/rich-text#all-rich-text
+/// See <https://developers.notion.com/reference/rich-text#all-rich-text>
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
pub struct RichTextCommon {
- plain_text: String,
- href: Option<String>,
- annotations: Option<Annotations>,
+ pub plain_text: String,
+ pub href: Option<String>,
+ pub annotations: Option<Annotations>,
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]
pub struct Link {
- url: String,
+ pub url: String,
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Clone)]
pub struct Text {
- content: String,
- link: Option<String>,
+ pub content: String,
+ pub link: Option<String>,
}
/// Rich text objects contain data for displaying formatted text, mentions, and equations.
@@ -64,18 +64,18 @@ pub struct Text {
#[serde(tag = "type")]
#[serde(rename_all = "snake_case")]
pub enum RichText {
- /// See https://developers.notion.com/reference/rich-text#text-objects
+ /// See <https://developers.notion.com/reference/rich-text#text-objects>
Text {
#[serde(flatten)]
rich_text: RichTextCommon,
text: Text,
},
- /// See https://developers.notion.com/reference/rich-text#mention-objects
+ /// See <https://developers.notion.com/reference/rich-text#mention-objects>
Mention {
#[serde(flatten)]
rich_text: RichTextCommon,
},
- /// See https://developers.notion.com/reference/rich-text#equation-objects
+ /// See <https://developers.notion.com/reference/rich-text#equation-objects>
Equation {
#[serde(flatten)]
rich_text: RichTextCommon,