Struct ibdl_common::post::Post  
source · pub struct Post {
    pub id: u64,
    pub website: ImageBoards,
    pub url: String,
    pub md5: String,
    pub extension: String,
    pub rating: Rating,
    pub tags: Vec<Tag>,
}Expand description
Catchall model for the necessary parts of the imageboard post to properly identify, download and save it.
Fields§
§id: u64ID number of the post given by the imageboard
website: ImageBoardsThe imageboard where this post was extracted from
url: StringDirect URL of the original image file located inside the imageboard’s server
md5: StringInstead of calculating the downloaded file’s MD5 hash on the fly, it uses the one provided by the API.
extension: StringThe original file extension provided by the imageboard.
https://konachan.com (Moebooru) and some other imageboards don’t provide this field. So, additional work is required to get the file extension from the url
rating: RatingRating of the post. Can be:
- Rating::Safefor SFW posts
- Rating::Questionablefor a not necessarily SFW post
- Rating::Explicitfor NSFW posts
- Rating::Unknownin case none of the above are correctly parsed
Set of tags associated with the post.
Used to exclude posts according to a blacklist
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
source§impl Ord for Post
 
impl Ord for Post
source§impl PartialEq<Post> for Post
 
impl PartialEq<Post> for Post
source§impl PartialOrd<Post> for Post
 
impl PartialOrd<Post> for Post
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
 
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for 
self and other) and is used by the <=
operator. Read moreimpl Eq for Post
impl StructuralEq for Post
Auto Trait Implementations§
impl RefUnwindSafe for Post
impl Send for Post
impl Sync for Post
impl Unpin 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
source§impl<Q, K> Equivalent<K> for Qwhere
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized,
 
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.