You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
use super::*;
|
|
|
|
use cryptohelpers::sha256::Sha256Hash;
|
|
|
|
|
|
|
|
use hard_format::formats::PEMFormattedString;
|
|
|
|
use tripcode::Tripcode;
|
|
|
|
|
|
|
|
id_type!(PostID; "A unique post ID");
|
|
|
|
|
|
|
|
/// A single completed post
|
|
|
|
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
|
|
|
pub struct Post
|
|
|
|
{
|
|
|
|
id: PostID,
|
|
|
|
|
|
|
|
name: Option<String>,
|
|
|
|
tripcode: Option<Tripcode>,
|
|
|
|
email: Option<String>,
|
|
|
|
|
|
|
|
body: PEMFormattedString,
|
|
|
|
signature: Option<PEMFormattedString>,
|
|
|
|
|
|
|
|
/// Hash of the body
|
|
|
|
hash: Sha256Hash,
|
|
|
|
}
|