pub struct Votable {
pub ups: i64,
pub downs: u64,
pub likes: Option<bool>,
}
Expand description
Implementation See: https://github.com/reddit-archive/reddit/wiki/JSON#votable-implementation
Fields§
§ups: i64
the number of upvotes. (includes own)
downs: u64
the number of downvotes. (includes own)
likes: Option<bool>
true if thing is liked by the user, false if thing is disliked, null if the user has not voted or you are not logged in. Certain languages such as Java may need to use a boolean wrapper that supports null assignment.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Votable
impl<'de> Deserialize<'de> for Votable
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 Votable
impl RefUnwindSafe for Votable
impl Send for Votable
impl Sync for Votable
impl Unpin for Votable
impl UnwindSafe for Votable
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