pub struct DeletedContent {
pub blocks: HashMap<BlockId, Block>,
pub structure: HashMap<BlockId, Vec<BlockId>>,
pub parent_id: BlockId,
pub deleted_at: DateTime<Utc>,
}Expand description
Represents deleted content that can be restored.
When blocks are deleted or sections are rewritten, this structure preserves the original content and structure for potential restoration.
Fields§
§blocks: HashMap<BlockId, Block>The blocks that were deleted, keyed by their original IDs
structure: HashMap<BlockId, Vec<BlockId>>The structure (parent -> children) of deleted blocks
parent_id: BlockIdThe parent block ID where this content was attached
deleted_at: DateTime<Utc>Timestamp when the deletion occurred
Implementations§
Source§impl DeletedContent
impl DeletedContent
Sourcepub fn block_count(&self) -> usize
pub fn block_count(&self) -> usize
Get the number of deleted blocks
Trait Implementations§
Source§impl Clone for DeletedContent
impl Clone for DeletedContent
Source§fn clone(&self) -> DeletedContent
fn clone(&self) -> DeletedContent
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 DeletedContent
impl Debug for DeletedContent
Source§impl<'de> Deserialize<'de> for DeletedContent
impl<'de> Deserialize<'de> for DeletedContent
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 DeletedContent
impl RefUnwindSafe for DeletedContent
impl Send for DeletedContent
impl Sync for DeletedContent
impl Unpin for DeletedContent
impl UnwindSafe for DeletedContent
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