pub enum PageCreateContent {
Variant0 {
canvas_content: PageContent,
type_: PageCreateContentVariant0Type,
},
Variant1 {
render_method: Option<PageEmbedRenderMethod>,
type_: PageCreateContentVariant1Type,
url: String,
},
Variant2(PageCreateContentVariant2),
}Expand description
Content that can be added to a page at creation time, either text (or rich text) or a URL to create a full-page embed.
JSON schema
{
"description": "Content that can be added to a page at creation time,
either text (or rich text) or a URL to create a full-page embed.",
"oneOf": [
{
"type": "object",
"required": [
"canvasContent",
"type"
],
"properties": {
"canvasContent": {
"$ref": "#/components/schemas/PageContent"
},
"type": {
"description": "Indicates a page containing canvas content.",
"type": "string",
"enum": [
"canvas"
],
"x-tsType": "PageTypeEnum.Canvas"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"type",
"url"
],
"properties": {
"renderMethod": {
"$ref": "#/components/schemas/PageEmbedRenderMethod"
},
"type": {
"description": "Indicates a page that embeds other content.",
"type": "string",
"enum": [
"embed"
],
"x-tsType": "PageTypeEnum.Embed"
},
"url": {
"description": "The URL of the content to embed.",
"examples": [
"https://example.com"
],
"type": "string"
}
},
"additionalProperties": false
},
{
"oneOf": [
{
"type": "object",
"required": [
"includeSubpages",
"mode",
"sourceDocId",
"sourcePageId",
"type"
],
"properties": {
"includeSubpages": {
"description": "Include subpages in the sync page.",
"type": "boolean"
},
"mode": {
"description": "Indicates a single-page sync page.",
"type": "string",
"enum": [
"page"
],
"x-tsType": "SyncPageTypeEnum.Page"
},
"sourceDocId": {
"description": "The id of the document to insert as a sync
page.",
"examples": [
"sHbI4uIwiK"
],
"type": "string"
},
"sourcePageId": {
"description": "The page id to insert as a sync page.",
"examples": [
"canvas-IjkLmnO"
],
"type": "string"
},
"type": {
"description": "Indicates a page that embeds other Coda
content.",
"type": "string",
"enum": [
"syncPage"
],
"x-tsType": "PageTypeEnum.SyncPage"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"mode",
"sourceDocId",
"type"
],
"properties": {
"mode": {
"description": "Indicates a full doc sync page.",
"type": "string",
"enum": [
"document"
],
"x-tsType": "SyncPageTypeEnum.Document"
},
"sourceDocId": {
"description": "The id of the document to insert as a sync
page.",
"examples": [
"sHbI4uIwiK"
],
"type": "string"
},
"type": {
"description": "Indicates a page that embeds other
content.",
"type": "string",
"enum": [
"syncPage"
],
"x-tsType": "PageTypeEnum.SyncPage"
}
},
"additionalProperties": false
}
]
}
],
"x-schema-name": "PageCreateContent"
}Variants§
Variant0
Fields
§
canvas_content: PageContent§
type_: PageCreateContentVariant0TypeIndicates a page containing canvas content.
Variant1
Fields
§
render_method: Option<PageEmbedRenderMethod>§
type_: PageCreateContentVariant1TypeIndicates a page that embeds other content.
Variant2(PageCreateContentVariant2)
Trait Implementations§
Source§impl Clone for PageCreateContent
impl Clone for PageCreateContent
Source§fn clone(&self) -> PageCreateContent
fn clone(&self) -> PageCreateContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageCreateContent
impl Debug for PageCreateContent
Source§impl<'de> Deserialize<'de> for PageCreateContent
impl<'de> Deserialize<'de> for PageCreateContent
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
Source§impl From<&PageCreateContent> for PageCreateContent
impl From<&PageCreateContent> for PageCreateContent
Source§fn from(value: &PageCreateContent) -> Self
fn from(value: &PageCreateContent) -> Self
Converts to this type from the input type.
Source§impl From<PageCreateContentVariant2> for PageCreateContent
impl From<PageCreateContentVariant2> for PageCreateContent
Source§fn from(value: PageCreateContentVariant2) -> Self
fn from(value: PageCreateContentVariant2) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PageCreateContent
impl RefUnwindSafe for PageCreateContent
impl Send for PageCreateContent
impl Sync for PageCreateContent
impl Unpin for PageCreateContent
impl UnwindSafe for PageCreateContent
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