fediverse 0.1.8

Just toying with the W3C ActivityStream & ActivityPub specs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::types::errors::TypeError;
use chrono::{DateTime, Utc};

/// On a [Tombstone](crate::types::extended::tombstone::Tombstone) object, the `deleted` property
/// is a timestamp for when the object was deleted.
///
/// Specifications: <https://www.w3.org/TR/activitystreams-vocabulary/#dfn-deleted>
#[derive(Debug, PartialEq, Eq)]
pub struct Deleted(DateTime<Utc>);

impl Deleted {
    pub fn new(value: DateTime<Utc>) -> Result<Self, TypeError> {
        Ok(Self(value))
    }
}