]> Untitled Git - lemmy.git/blob - crates/api_crud/src/lib.rs
Remove SendActivity and Perform traits, rely on channel (#3596)
[lemmy.git] / crates / api_crud / src / lib.rs
1 use actix_web::web::Data;
2 use lemmy_api_common::context::LemmyContext;
3 use lemmy_utils::error::LemmyError;
4
5 mod comment;
6 mod community;
7 mod custom_emoji;
8 pub mod post;
9 mod private_message;
10 mod site;
11 mod user;
12
13 #[async_trait::async_trait(?Send)]
14 pub trait PerformCrud {
15   type Response: serde::ser::Serialize + Send + Clone + Sync;
16
17   async fn perform(&self, context: &Data<LemmyContext>) -> Result<Self::Response, LemmyError>;
18 }