Trait rawr::traits::Lockable [] [src]

pub trait Lockable {
    fn locked(&self) -> bool;
    fn lock(&mut self) -> Result<(), APIError>;
    fn unlock(&mut self) -> Result<(), APIError>;

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

An object that can be locked so that no further comments can be added.

Required Methods

fn locked(&self) -> bool

Returns the current locked state of the submission.

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

Locks the current submission, provided you have the correct privileges.

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

Unlocks the current submission, provided you have the correct privileges.

Provided Methods

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

Toggles the lock state (locks if unlocked, unlocks if locked).

Implementors