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.
yuurei/src/post.rs

25 lines
506 B

4 years ago
use super::*;
4 years ago
use cryptohelpers::sha256::Sha256Hash;
4 years ago
4 years ago
use hard_format::formats::PEMFormattedString;
use tripcode::Tripcode;
4 years ago
id_type!(PostID; "A unique post ID");
/// A single completed post
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4 years ago
pub struct Post
{
4 years ago
id: PostID,
4 years ago
4 years ago
name: Option<String>,
4 years ago
tripcode: Option<Tripcode>,
4 years ago
email: Option<String>,
4 years ago
4 years ago
body: PEMFormattedString,
signature: Option<PEMFormattedString>,
/// Hash of the body
4 years ago
hash: Sha256Hash,
4 years ago
}