pub struct BlockContent {
pub rich_text: Option<Vec<RichTextObject>>,
pub language: Option<String>,
pub checked: Option<bool>,
pub icon: Option<String>,
pub color: Option<String>,
pub url: Option<String>,
pub caption: Option<String>,
pub alt_text: Option<String>,
pub embed_url: Option<String>,
pub cells: Option<Vec<Vec<RichTextObject>>>,
pub expression: Option<String>,
}Expand description
BlockContent : Type-specific payload for a block. Fields populated depend on Block.type. All fields are optional at the schema level; the runtime enforces the per-type contract. Note: this object uses snake_case keys to match the JSON the Go providers.BlockContent struct emits and accepts. Other parts of the SpatioAPI use camelCase; blocks are the exception because the block model is shared with external Notion-like providers whose canonical wire format is snake_case.
Fields§
§rich_text: Option<Vec<RichTextObject>>§language: Option<String>Programming language for code blocks.
checked: Option<bool>Toggle state for to_do blocks.
icon: Option<String>Emoji or short string for callout blocks.
color: Option<String>Theme color for callout blocks.
url: Option<String>Source URL for image, video, file blocks.
caption: Option<String>Visible caption for media blocks.
alt_text: Option<String>Screen-reader description for media blocks. Distinct from caption (visible to readers) — required for accessible notes when the image conveys meaning.
embed_url: Option<String>Source URL for embed blocks.
cells: Option<Vec<Vec<RichTextObject>>>2D rich-text grid for table and table_row blocks.
expression: Option<String>TeX/MathJax expression for equation blocks.
Implementations§
Source§impl BlockContent
impl BlockContent
Sourcepub fn new() -> BlockContent
pub fn new() -> BlockContent
Type-specific payload for a block. Fields populated depend on Block.type. All fields are optional at the schema level; the runtime enforces the per-type contract. Note: this object uses snake_case keys to match the JSON the Go providers.BlockContent struct emits and accepts. Other parts of the SpatioAPI use camelCase; blocks are the exception because the block model is shared with external Notion-like providers whose canonical wire format is snake_case.
Trait Implementations§
Source§impl Clone for BlockContent
impl Clone for BlockContent
Source§fn clone(&self) -> BlockContent
fn clone(&self) -> BlockContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockContent
impl Debug for BlockContent
Source§impl Default for BlockContent
impl Default for BlockContent
Source§fn default() -> BlockContent
fn default() -> BlockContent
Source§impl<'de> Deserialize<'de> for BlockContent
impl<'de> Deserialize<'de> for BlockContent
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>,
Source§impl PartialEq for BlockContent
impl PartialEq for BlockContent
Source§fn eq(&self, other: &BlockContent) -> bool
fn eq(&self, other: &BlockContent) -> bool
self and other values to be equal, and is used by ==.