wp_mini/field/
part_content_field.rs

1use crate::field::{AuthRequiredFields, DefaultableFields};
2use strum_macros::{Display, EnumIter};
3
4/// Represents the fields that can be requested for a `PartContent` object from the Wattpad API.
5#[derive(Debug, Clone, Copy, Display, EnumIter, PartialEq, Eq, Ord, PartialOrd, Hash)]
6#[strum(serialize_all = "camelCase")]
7pub enum PartContentField {
8    /// The full text content of the story part.
9    Text,
10
11    /// A hash of the text content, likely for caching or integrity checks.
12    #[strum(serialize = "text_hash")]
13    TextHash,
14}
15
16impl AuthRequiredFields for PartContentField {}
17
18impl DefaultableFields for PartContentField {
19    fn default_fields() -> Vec<Self> {
20        vec![Self::Text]
21    }
22}