pub struct CreateReportBuilder {
category: Option<ReportCategory>,
reason: Option<Uuid>,
object_id: Option<Uuid>,
details: Option<Option<String>>,
/* private fields */
}
Expand description
Builder for CreateReport
.
Fields§
§category: Option<ReportCategory>
§reason: Option<Uuid>
The report reason ID for sub-categorization.
For example, if a manga was being reported for being a troll entry, the specific reason ID should be used, obtained from the list report reasons endpoint.
object_id: Option<Uuid>
The ID from the category type.
For example, if the category is “manga”, this should be a manga UUID.
details: Option<Option<String>>
Optional notes about why this is being reported.
Implementations§
Source§impl CreateReportBuilder
impl CreateReportBuilder
pub fn category<VALUE: Into<ReportCategory>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn reason<VALUE: Into<Uuid>>(&mut self, value: VALUE) -> &mut Self
pub fn reason<VALUE: Into<Uuid>>(&mut self, value: VALUE) -> &mut Self
The report reason ID for sub-categorization.
For example, if a manga was being reported for being a troll entry, the specific reason ID should be used, obtained from the list report reasons endpoint.
Sourcepub fn object_id<VALUE: Into<Uuid>>(&mut self, value: VALUE) -> &mut Self
pub fn object_id<VALUE: Into<Uuid>>(&mut self, value: VALUE) -> &mut Self
The ID from the category type.
For example, if the category is “manga”, this should be a manga UUID.
Sourcepub fn details<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn details<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Optional notes about why this is being reported.
Sourcepub fn build(&self) -> Result<CreateReport, BuilderError>
pub fn build(&self) -> Result<CreateReport, BuilderError>
Sourcefn create_empty() -> Self
fn create_empty() -> Self
Create an empty builder, with all fields set to None
or PhantomData
.
Trait Implementations§
Source§impl Clone for CreateReportBuilder
impl Clone for CreateReportBuilder
Source§fn clone(&self) -> CreateReportBuilder
fn clone(&self) -> CreateReportBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more