2021-10-28 15:25:26 +00:00
|
|
|
use activitystreams::object::kind::TombstoneType;
|
2021-10-27 16:03:07 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use serde_with::skip_serializing_none;
|
2021-11-16 00:58:15 +00:00
|
|
|
use url::Url;
|
2021-10-27 16:03:07 +00:00
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
|
|
#[serde(rename_all = "camelCase")]
|
|
|
|
pub struct Tombstone {
|
2021-11-16 00:58:15 +00:00
|
|
|
pub(crate) id: Url,
|
2021-10-27 16:03:07 +00:00
|
|
|
#[serde(rename = "type")]
|
|
|
|
kind: TombstoneType,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Tombstone {
|
2021-11-16 00:58:15 +00:00
|
|
|
pub fn new(id: Url) -> Tombstone {
|
2021-10-27 16:03:07 +00:00
|
|
|
Tombstone {
|
2021-11-16 00:58:15 +00:00
|
|
|
id,
|
2021-10-27 16:03:07 +00:00
|
|
|
kind: TombstoneType::Tombstone,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|