Trait rawr::traits::Stickable [] [src]

pub trait Stickable {
    fn stickied(&self) -> bool;
    fn stick(&mut self) -> Result<(), APIError>;
    fn unstick(&mut self) -> Result<(), APIError>;

    fn toggle_sticky(&mut self) -> Result<(), APIError> { ... }
}

An object that can be stickied (made into an 'annoucement post'). In practice, this is only self/link posts.

Required Methods

fn stickied(&self) -> bool

Returns the current sticky state of the submission.

fn stick(&mut self) -> Result<(), APIError>

Makes the selected post a sticky, provided that you have the correct privileges. For comments, this will also distinguish the post as [M].

fn unstick(&mut self) -> Result<(), APIError>

Makes this sticky post a normal post, provided that you have the correct privileges. For comments, this will also remove the [M] distinguish.

Provided Methods

fn toggle_sticky(&mut self) -> Result<(), APIError>

Toggles the sticky state (i.e. becomes sticky if it is not one, and becomes normal if it is a sticky)

Implementors