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
type Response = CommentReportResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommentReportResponse, 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
type Response = CommentReportResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<CommentReportResponse, 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 = BlockCommunityResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<BlockCommunityResponse, 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 = BlockPersonResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<BlockPersonResponse, 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,
type Response = GetUnreadCountResponse
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 = 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<Self::Response, 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 = GetSiteMetadataResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
_websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<GetSiteMetadataResponse, 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 = PostReportResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostReportResponse, 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
type Response = PostReportResponse
fn perform<'life0, 'life1, 'async_trait>(
&'life0 self,
context: &'life1 Data<LemmyContext>,
websocket_id: Option<ConnectionId>
) -> Pin<Box<dyn Future<Output = Result<PostReportResponse, 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