mastodon-async/entities/src/report.rs

24 lines
614 B
Rust
Raw Normal View History

2022-11-27 14:44:43 +00:00
//! module containing information about a finished report of a user.
2022-12-07 20:58:28 +00:00
use serde::{Deserialize, Serialize};
2022-11-27 14:44:43 +00:00
/// A struct containing info about a report.
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
2022-11-27 14:44:43 +00:00
pub struct Report {
/// The ID of the report.
2023-01-09 12:54:07 +00:00
pub id: ReportId,
2022-11-27 14:44:43 +00:00
/// The action taken in response to the report.
pub action_taken: String,
}
2023-01-09 12:54:07 +00:00
/// Wrapper type for a report ID string
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(transparent)]
pub struct ReportId(String);
impl AsRef<str> for ReportId {
fn as_ref(&self) -> &str {
&self.0
}
}