Trait rawr::traits::Commentable [] [src]

pub trait Commentable<'a> {
    fn reply_count(&self) -> u64;
    fn reply(&self, &str) -> Result<(), APIError>;
    fn replies(self) -> Result<CommentList<'a>, APIError>;
}

An object that can be commented upon and may have comments.

Required Methods

fn reply_count(&self) -> u64

The number of comments on this object. Prefer this to replies().count().

fn reply(&self, &str) -> Result<(), APIError>

Sends a reply with the specified body.

fn replies(self) -> Result<CommentList<'a>, APIError>

Gets all replies as a self-paginating CommentList, which can be iterated through as necessary. Comments cannot be batched like submission listings, so there may be multiple requests on large threads to get all comments.

Implementors