Trait lemmy_api::Perform [−][src]
pub trait Perform { type Response: Serialize + Send; fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<Self::Response, LemmyError>> + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait; }
Associated Types
Required methods
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<Self::Response, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Implementations on Foreign Types
type Response = CommentResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommentResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = CommentResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommentResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = CommentResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommentResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Creates a comment report and notifies the moderators of the community
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CreateCommentReportResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolves or unresolves a comment report and notifies the moderators of the community
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<ResolveCommentReportResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Lists comment reports for a community if an id is supplied or returns all comment reports for communities a user moderates
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<ListCommentReportsResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = CommunityResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommunityResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = BanFromCommunityResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<BanFromCommunityResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<AddModToCommunityResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetCommunityResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetCommunityResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = LoginResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<LoginResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetCaptchaResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<Self::Response, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = LoginResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<LoginResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = LoginResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<LoginResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = AddAdminResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<AddAdminResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = BanPersonResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<BanPersonResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetRepliesResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetRepliesResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetPersonMentionsResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PersonMentionResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PersonMentionResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetRepliesResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetRepliesResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PasswordResetResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PasswordResetResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = LoginResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<LoginResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetReportCountResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetReportCountResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetFollowedCommunitiesResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PostResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PostResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PostResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PostResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Creates a post report and notifies the moderators of the community
type Response = CreatePostReportResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CreatePostReportResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Resolves or unresolves a post report and notifies the moderators of the community
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<ResolvePostReportResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Lists post reports for a community if an id is supplied or returns all post reports for communities a user moderates
type Response = ListPostReportsResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<ListPostReportsResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PrivateMessageResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PrivateMessageResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetModlogResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetModlogResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = SearchResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<SearchResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetSiteResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetSiteResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetSiteConfigResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetSiteConfigResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = GetSiteConfigResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetSiteConfigResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = UserJoinResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<UserJoinResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = CommunityJoinResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommunityJoinResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = ModJoinResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<ModJoinResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
type Response = PostJoinResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostJoinResponse, LemmyError>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,