fediverse/types/extended/
tombstone.rs

1use crate::types::core::object::ObjectProperties;
2use crate::types::properties::deleted::Deleted;
3use crate::types::properties::former_type::FormerType;
4
5/// A Tombstone represents a content object that has been deleted. It can be used in [Collections](crate::types::core::collection::Collection)
6/// to signify that there used to be an object at this position, but it has been deleted.
7#[derive(Default, Debug, PartialEq)]
8pub struct Tombstone {
9    pub object_properties: ObjectProperties,
10    pub tombstone_properties: TombstoneProperties,
11}
12
13impl Tombstone {
14    pub fn new(
15        object_properties: ObjectProperties,
16        tombstone_properties: TombstoneProperties,
17    ) -> Self {
18        Self {
19            object_properties,
20            tombstone_properties,
21        }
22    }
23}
24
25#[derive(Default, Debug, PartialEq)]
26pub struct TombstoneProperties {
27    pub former_type: Option<FormerType>,
28    pub deleted: Option<Deleted>,
29}