pub struct AnnotationTask { /* private fields */ }Expand description
One pairwise annotation task and its review state.
Implementations§
Source§impl AnnotationTask
impl AnnotationTask
Sourcepub fn new(
id: impl Into<String>,
source: TraceRef,
input: Value,
candidates: Vec<ReviewCandidate>,
rubric: ReviewRubric,
priority: i32,
created_at_ms: u64,
required_reviews: usize,
) -> Result<Self>
pub fn new( id: impl Into<String>, source: TraceRef, input: Value, candidates: Vec<ReviewCandidate>, rubric: ReviewRubric, priority: i32, created_at_ms: u64, required_reviews: usize, ) -> Result<Self>
Create a pairwise annotation task.
Sourcepub fn candidates(&self) -> &[ReviewCandidate]
pub fn candidates(&self) -> &[ReviewCandidate]
The two candidates under comparison.
Sourcepub fn rubric(&self) -> &ReviewRubric
pub fn rubric(&self) -> &ReviewRubric
Versioned scoring rubric.
Sourcepub fn created_at_ms(&self) -> u64
pub fn created_at_ms(&self) -> u64
Task creation timestamp.
Sourcepub fn required_reviews(&self) -> usize
pub fn required_reviews(&self) -> usize
Number of independent reviews required before resolution.
Sourcepub fn reviews(&self) -> &BTreeMap<String, StoredReview>
pub fn reviews(&self) -> &BTreeMap<String, StoredReview>
Accepted reviews, keyed by reviewer identity.
Sourcepub fn resolution(&self) -> Option<&ReviewResolution>
pub fn resolution(&self) -> Option<&ReviewResolution>
Final resolution, when one exists.
Sourcepub fn status_at(&self, now_ms: u64) -> AnnotationStatus
pub fn status_at(&self, now_ms: u64) -> AnnotationStatus
Compute status without mutating or consulting a wall clock.
Trait Implementations§
Source§impl Clone for AnnotationTask
impl Clone for AnnotationTask
Source§impl Debug for AnnotationTask
impl Debug for AnnotationTask
Source§impl PartialEq for AnnotationTask
impl PartialEq for AnnotationTask
Source§impl Serialize for AnnotationTask
impl Serialize for AnnotationTask
impl StructuralPartialEq for AnnotationTask
Auto Trait Implementations§
impl Freeze for AnnotationTask
impl RefUnwindSafe for AnnotationTask
impl Send for AnnotationTask
impl Sync for AnnotationTask
impl Unpin for AnnotationTask
impl UnsafeUnpin for AnnotationTask
impl UnwindSafe for AnnotationTask
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