pub struct ReviewQueue {
pub items: Vec<ReviewItem>,
}Expand description
Review queue manager
Fields§
§items: Vec<ReviewItem>Implementations§
Source§impl ReviewQueue
impl ReviewQueue
Sourcepub fn add_review(&mut self, item: ReviewItem) -> Result<()>
pub fn add_review(&mut self, item: ReviewItem) -> Result<()>
Add a new review item
Sourcepub fn resolve_review(
&mut self,
id: &str,
status: ReviewStatus,
response: &str,
) -> Result<()>
pub fn resolve_review( &mut self, id: &str, status: ReviewStatus, response: &str, ) -> Result<()>
Resolve a review item
Sourcepub fn list_pending(&self) -> Vec<&ReviewItem>
pub fn list_pending(&self) -> Vec<&ReviewItem>
List pending reviews
Sourcepub fn list_resolved(&self, limit: usize) -> Vec<&ReviewItem>
pub fn list_resolved(&self, limit: usize) -> Vec<&ReviewItem>
List resolved reviews (most recent N)
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Count pending reviews
Trait Implementations§
Source§impl Clone for ReviewQueue
impl Clone for ReviewQueue
Source§fn clone(&self) -> ReviewQueue
fn clone(&self) -> ReviewQueue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReviewQueue
impl Debug for ReviewQueue
Source§impl Default for ReviewQueue
impl Default for ReviewQueue
Source§fn default() -> ReviewQueue
fn default() -> ReviewQueue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ReviewQueue
impl<'de> Deserialize<'de> for ReviewQueue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ReviewQueue
impl RefUnwindSafe for ReviewQueue
impl Send for ReviewQueue
impl Sync for ReviewQueue
impl Unpin for ReviewQueue
impl UnsafeUnpin for ReviewQueue
impl UnwindSafe for ReviewQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more