pub struct Post {Show 27 fields
pub no: u64,
pub resto: u64,
pub time: i64,
pub now: String,
pub name: String,
pub sub: Option<String>,
pub com: Option<String>,
pub trip: Option<String>,
pub id: Option<String>,
pub capcode: Option<String>,
pub country: Option<String>,
pub country_name: Option<String>,
pub board_flag: Option<String>,
pub flag_name: Option<String>,
pub since4pass: Option<u32>,
pub sticky: bool,
pub closed: bool,
pub archived: bool,
pub archived_on: Option<i64>,
pub bumplimit: bool,
pub imagelimit: bool,
pub replies: Option<u32>,
pub images: Option<u32>,
pub unique_ips: Option<u32>,
pub semantic_url: Option<String>,
pub tag: Option<String>,
pub attachment: Option<Attachment>,
}Expand description
A sanitized post. Attachment metadata is split out into Attachment.
4chan’s raw post JSON mixes post metadata and attachment metadata into the
same object, with most attachment fields optional. We normalize that here so
attachment.is_some() is the single source of truth.
Fields§
§no: u64Post number.
resto: u64Reply-to. 0 for OP, OP number for replies.
time: i64Unix timestamp of post creation.
now: StringPre-formatted MM/DD/YY(Day)HH:MM timestamp.
name: StringPoster name. Defaults to "Anonymous".
sub: Option<String>OP-only subject.
com: Option<String>HTML-escaped comment body.
trip: Option<String>Tripcode (!tripcode or !!securetrip).
id: Option<String>8-character poster ID, for boards that show one.
capcode: Option<String>mod, admin, developer, etc.
country: Option<String>ISO 3166-1 alpha-2 country code.
country_name: Option<String>§board_flag: Option<String>§flag_name: Option<String>§since4pass: Option<u32>4-digit year the poster bought a 4chan Pass.
sticky: bool§closed: bool§archived: bool§archived_on: Option<i64>§bumplimit: bool§imagelimit: bool§replies: Option<u32>§images: Option<u32>§unique_ips: Option<u32>§semantic_url: Option<String>§tag: Option<String>§attachment: Option<Attachment>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Post
impl<'de> Deserialize<'de> for Post
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Post
impl RefUnwindSafe for Post
impl Send for Post
impl Sync for Post
impl Unpin for Post
impl UnsafeUnpin for Post
impl UnwindSafe for Post
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more