]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/mod.rs
f4ad9e23407d737aeb0c3ebfe3fc4e514baa6e3d
[lemmy.git] / crates / apub / src / protocol / mod.rs
1 use activitystreams::object::kind::ImageType;
2 use serde::{Deserialize, Serialize};
3 use url::Url;
4
5 use lemmy_apub_lib::values::MediaTypeMarkdown;
6
7 pub(crate) mod collections;
8 pub(crate) mod objects;
9
10 #[derive(Clone, Debug, Deserialize, Serialize)]
11 #[serde(rename_all = "camelCase")]
12 pub struct Source {
13   pub(crate) content: String,
14   pub(crate) media_type: MediaTypeMarkdown,
15 }
16
17 #[derive(Clone, Debug, Deserialize, Serialize)]
18 #[serde(rename_all = "camelCase")]
19 pub struct ImageObject {
20   #[serde(rename = "type")]
21   pub(crate) kind: ImageType,
22   pub(crate) url: Url,
23 }