pub struct CopiedBlocks {
pub roots: Vec<Block>,
pub by_id: HashMap<BlockId, Block>,
}Expand description
Subtree bundle produced by crate::html_to_copied_blocks and
consumed by crate::blocks_to_html.
roots: top-level blocks in document order.by_id: flat map containing every block (including descendants oftable/table_row/toggle) so pasting can reconstruct nested structures faithfully.
The React side serialises / deserialises this across the WASM boundary as JSON; the type declaration is therefore the source of truth for the schema.
Fields§
§roots: Vec<Block>§by_id: HashMap<BlockId, Block>Trait Implementations§
Source§impl Clone for CopiedBlocks
impl Clone for CopiedBlocks
Source§fn clone(&self) -> CopiedBlocks
fn clone(&self) -> CopiedBlocks
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CopiedBlocks
impl Debug for CopiedBlocks
Source§impl<'de> Deserialize<'de> for CopiedBlocks
impl<'de> Deserialize<'de> for CopiedBlocks
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 CopiedBlocks
impl RefUnwindSafe for CopiedBlocks
impl Send for CopiedBlocks
impl Sync for CopiedBlocks
impl Unpin for CopiedBlocks
impl UnsafeUnpin for CopiedBlocks
impl UnwindSafe for CopiedBlocks
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