Trait rawr::traits::Editable
[−]
[src]
pub trait Editable { fn edited(&self) -> bool; fn edited_time(&self) -> Option<i64>; fn edit(&mut self, text: &str) -> Result<(), APIError>; fn body(&self) -> Option<String>; fn body_html(&self) -> Option<String>; }
An object that can be edited (anything that has a body).
Required Methods
fn edited(&self) -> bool
true
if edited, otherwise false
.
fn edited_time(&self) -> Option<i64>
Returns Some(edited timestamp in logged-in user's time zone)
if edited, otherwise None
.
fn edit(&mut self, text: &str) -> Result<(), APIError>
Edits the specified post (if possible) with the new text (in Markdown format)
fn body(&self) -> Option<String>
Gets the body of a comment or message or the self text of a post, if available.
In the case of link posts, this will be None
.
fn body_html(&self) -> Option<String>
Gets the comment/message body HTML or self text HTML if available.
Implementors
impl<'a> Editable for Comment<'a>
impl<'a> Editable for Submission<'a>
impl<'a> Editable for Message<'a>