Enum PageCreateContent

Source
pub enum PageCreateContent {
    Variant0 {
        canvas_content: PageContent,
        type_: PageCreateContentVariant0Type,
    },
    Variant1 {
        render_method: Option<PageEmbedRenderMethod>,
        type_: PageCreateContentVariant1Type,
        url: String,
    },
    Variant2 {
        include_subpages: bool,
        mode: PageCreateContentVariant2Mode,
        source_doc_id: String,
        source_page_id: String,
        type_: PageCreateContentVariant2Type,
    },
    Variant3 {
        mode: PageCreateContentVariant3Mode,
        source_doc_id: String,
        type_: PageCreateContentVariant3Type,
    },
}
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
   },
   {
     "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_: PageCreateContentVariant0Type

Indicates a page containing canvas content.

§

Variant1

Fields

§type_: PageCreateContentVariant1Type

Indicates a page that embeds other content.

§url: String

The URL of the content to embed.

§

Variant2

Fields

§include_subpages: bool

Include subpages in the sync page.

§mode: PageCreateContentVariant2Mode

Indicates a single-page sync page.

§source_doc_id: String

The id of the document to insert as a sync page.

§source_page_id: String

The page id to insert as a sync page.

§type_: PageCreateContentVariant2Type

Indicates a page that embeds other Coda content.

§

Variant3

Fields

§mode: PageCreateContentVariant3Mode

Indicates a full doc sync page.

§source_doc_id: String

The id of the document to insert as a sync page.

§type_: PageCreateContentVariant3Type

Indicates a page that embeds other content.

Trait Implementations§

Source§

impl Clone for PageCreateContent

Source§

fn clone(&self) -> PageCreateContent

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PageCreateContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PageCreateContent

Source§

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

Source§

fn from(value: &PageCreateContent) -> Self

Converts to this type from the input type.
Source§

impl Serialize for PageCreateContent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,