Trait rawr::traits::Content
[−]
[src]
pub trait Content { fn author(&self) -> User; fn author_flair_text(&self) -> Option<String>; fn author_flair_css(&self) -> Option<String>; fn subreddit(&self) -> Subreddit; fn delete(self) -> Result<(), APIError>; fn name(&self) -> &str; }
An object that was created by an author and is in a subreddit (i.e. a submission or comment)
Required Methods
fn author(&self) -> User
The author of the object.
fn author_flair_text(&self) -> Option<String>
The flair text of the user flair, if present.
fn author_flair_css(&self) -> Option<String>
The flair CSS class of the user flair, if present.
fn subreddit(&self) -> Subreddit
For submissions (link/self posts), this is the subreddit where it was posted. For comments, this is the subreddit of the parent submission.
fn delete(self) -> Result<(), APIError>
Deletes the specified object, if possible. This may be irreversible. Use with caution.
fn name(&self) -> &str
Gets the full ID of this comment (kind + id)
Implementors
impl<'a> Content for Comment<'a>
impl<'a> Content for Submission<'a>
impl<'a> Content for Message<'a>