pub struct Block {Show 40 fields
pub parent: Parent,
pub object: String,
pub id: String,
pub created_time: String,
pub last_edited_time: String,
pub created_by: User,
pub last_edited_by: User,
pub archived: bool,
pub in_trash: bool,
pub type_name: String,
pub has_children: bool,
pub is_togglable: bool,
pub bookmark: Option<Bookmark>,
pub breadcrumb: Option<FxHashMap<String, String>>,
pub bulleted_list_item: Option<BulletedListItem>,
pub callout: Option<Callout>,
pub child_database: Option<ChildDatabase>,
pub child_page: Option<ChildPage>,
pub code: Option<Code>,
pub column_list: Option<FxHashMap<String, String>>,
pub column: Option<FxHashMap<String, String>>,
pub divider: Option<FxHashMap<String, String>>,
pub embed: Option<Embed>,
pub equation: Option<Equation>,
pub file: Option<File>,
pub heading_1: Option<Heading>,
pub heading_2: Option<Heading>,
pub heading_3: Option<Heading>,
pub image: Option<Image>,
pub link_preview: Option<LinkPreview>,
pub numbered_list_item: Option<NumberedListItem>,
pub paragraph: Option<Paragraph>,
pub pdf: Option<Pdf>,
pub quote: Option<Quote>,
pub table: Option<Table>,
pub table_row: Option<TableRow>,
pub table_of_contents: Option<TableOfContents>,
pub to_do: Option<ToDo>,
pub toggle: Option<ToggleBlock>,
pub video: Option<Video>,
}
Fields§
§parent: Parent
§object: String
§id: String
§created_time: String
§last_edited_time: String
§created_by: User
§last_edited_by: User
§archived: bool
§in_trash: bool
§type_name: String
§has_children: bool
§is_togglable: bool
§bookmark: Option<Bookmark>
§bulleted_list_item: Option<BulletedListItem>
§callout: Option<Callout>
§child_database: Option<ChildDatabase>
§child_page: Option<ChildPage>
§code: Option<Code>
§column_list: Option<FxHashMap<String, String>>
§column: Option<FxHashMap<String, String>>
§divider: Option<FxHashMap<String, String>>
§embed: Option<Embed>
§equation: Option<Equation>
§file: Option<File>
§heading_1: Option<Heading>
§heading_2: Option<Heading>
§heading_3: Option<Heading>
§image: Option<Image>
§link_preview: Option<LinkPreview>
§numbered_list_item: Option<NumberedListItem>
§paragraph: Option<Paragraph>
§pdf: Option<Pdf>
§quote: Option<Quote>
§table: Option<Table>
§table_row: Option<TableRow>
§table_of_contents: Option<TableOfContents>
§to_do: Option<ToDo>
§toggle: Option<ToggleBlock>
§video: Option<Video>
Implementations§
Source§impl Block
impl Block
pub fn bookmark( parent_type: ParentType, parent_id: String, caption: String, url: String, ) -> Self
pub fn bulleted_list_item( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn callout( parent_type: ParentType, parent_id: String, text: String, icon: Icon, color: Color, ) -> Self
pub fn child_database( parent_type: ParentType, parent_id: String, title: String, ) -> Self
pub fn child_page( parent_type: ParentType, parent_id: String, title: String, ) -> Self
pub fn code( parent_type: ParentType, parent_id: String, caption: String, language: String, texts: Vec<String>, ) -> Self
pub fn column_list(parent_type: ParentType, parent_id: String) -> Self
pub fn column(parent_type: ParentType, parent_id: String) -> Self
pub fn divider(parent_type: ParentType, parent_id: String) -> Self
pub fn embed(parent_type: ParentType, parent_id: String, url: String) -> Self
pub fn equation( parent_type: ParentType, parent_id: String, expression: String, ) -> Self
pub fn file(parent_type: ParentType, parent_id: String) -> Self
pub fn heading_1( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn heading_2( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn heading_3( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn image(parent_type: ParentType, parent_id: String, url: String) -> Self
pub fn link_preview( parent_type: ParentType, parent_id: String, url: String, ) -> Self
pub fn numbered_list_item( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn paragraph( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn pdf(parent_type: ParentType, parent_id: String, url: String) -> Self
pub fn quote( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn table(parent_type: ParentType, parent_id: String) -> Self
pub fn table_row( parent_type: ParentType, parent_id: String, cells: Vec<String>, ) -> Self
pub fn table_of_contents(parent_type: ParentType, parent_id: String) -> Self
pub fn to_do( parent_type: ParentType, parent_id: String, texts: Vec<String>, checked: bool, ) -> Self
pub fn toggle_blocks( parent_type: ParentType, parent_id: String, texts: Vec<String>, ) -> Self
pub fn video(parent_type: ParentType, parent_id: String, url: String) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnwindSafe for Block
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