pub enum Node {
CodeBlock {
attrs: Option<CodeBlockAttrs>,
content: Vec<Self>,
},
Doc {
version: u64,
content: Vec<Self>,
},
Heading {
content: Vec<Self>,
attrs: HeadingAttrs,
},
Paragraph {
attrs: Option<ParagraphAttrs>,
content: Vec<Self>,
},
Text {
text: String,
marks: Vec<Mark>,
},
}Variants§
CodeBlock
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/codeBlock/
{
"type": "codeBlock",
"attrs": {
"language": "javascript"
},
"content": [
{
"type": "text",
"text": "var foo = {};\nvar bar = [];"
}
]
}Doc
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/doc/
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello world"
}
]
}
]
}Heading
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/heading/
{
"type": "heading",
"attrs": {
"level": 1
},
"content": [
{
"type": "text",
"text": "Heading 1"
}
]
}Paragraph
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/paragraph/
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Hello world"
}
]
}Text
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/text/
{
"type": "text",
"text": "Hello world"
}Implementations§
Source§impl Node
impl Node
Sourcepub fn new_codeblock(content: Vec<Node>, attrs: Option<CodeBlockAttrs>) -> Self
pub fn new_codeblock(content: Vec<Node>, attrs: Option<CodeBlockAttrs>) -> Self
Create a new builder for a CodeBlock discriminant.
Sourcepub fn new_heading(content: Vec<Node>, attrs: HeadingAttrs) -> Self
pub fn new_heading(content: Vec<Node>, attrs: HeadingAttrs) -> Self
Create a new builder for a Heading discriminant.
Sourcepub fn new_paragraph(content: Vec<Node>, attrs: Option<ParagraphAttrs>) -> Self
pub fn new_paragraph(content: Vec<Node>, attrs: Option<ParagraphAttrs>) -> Self
Create a new builder for a Paragraph discriminant.
Source§impl Node
impl Node
Sourcepub fn codeblock() -> NewCodeblockNodeBuilder
pub fn codeblock() -> NewCodeblockNodeBuilder
Create a new builder for a CodeBlock discriminant.
Source§impl Node
impl Node
Sourcepub fn heading() -> NewHeadingNodeBuilder
pub fn heading() -> NewHeadingNodeBuilder
Create a new builder for a Heading discriminant.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Node
impl<'de> Deserialize<'de> for Node
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnsafeUnpin for Node
impl UnwindSafe for Node
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more