1 use serde::{Deserialize, Serialize};
4 static ref CONTEXT: Vec<serde_json::Value> =
5 serde_json::from_str(include_str!("../assets/lemmy/context.json")).expect("parse context");
8 #[derive(Serialize, Deserialize, Debug)]
9 pub(crate) struct WithContext<T> {
10 #[serde(rename = "@context")]
11 context: Vec<serde_json::Value>,
16 impl<T> WithContext<T> {
17 pub(crate) fn new(inner: T) -> WithContext<T> {
19 context: CONTEXT.clone(),
23 pub(crate) fn inner(self) -> T {