Trait lemmy_db_queries::Reportable[][src]

pub trait Reportable {
    type Form;
    fn report(conn: &PgConnection, form: &Self::Form) -> Result<Self, Error>
    where
        Self: Sized
;
fn resolve(
        conn: &PgConnection,
        report_id: i32,
        resolver_id: PersonId
    ) -> Result<usize, Error>
    where
        Self: Sized
;
fn unresolve(
        conn: &PgConnection,
        report_id: i32,
        resolver_id: PersonId
    ) -> Result<usize, Error>
    where
        Self: Sized
; }

Associated Types

Required methods

Implementations on Foreign Types

creates a comment report and returns it

  • conn - the postgres connection
  • comment_report_form - the filled CommentReportForm to insert

resolve a comment report

  • conn - the postgres connection
  • report_id - the id of the report to resolve
  • by_resolver_id - the id of the user resolving the report

unresolve a comment report

  • conn - the postgres connection
  • report_id - the id of the report to unresolve
  • by_resolver_id - the id of the user unresolving the report

creates a post report and returns it

  • conn - the postgres connection
  • post_report_form - the filled CommentReportForm to insert

resolve a post report

  • conn - the postgres connection
  • report_id - the id of the report to resolve
  • by_resolver_id - the id of the user resolving the report

resolve a post report

  • conn - the postgres connection
  • report_id - the id of the report to unresolve
  • by_resolver_id - the id of the user unresolving the report

Implementors