pub struct WorkerState {
pub id: u64,
pub role: Role,
pub reputation: u32,
pub available: bool,
}Expand description
A role-agent’s live state for allocation: its id (the tokenId that is both
the claimBounty claimant and the attest subject), the role it fills, its
reputation (the ranking signal Reviewer attestations build), and whether it
can take a new task this tick.
Fields§
§id: u64§role: Role§reputation: u32§available: boolTrait Implementations§
Source§impl Clone for WorkerState
impl Clone for WorkerState
Source§fn clone(&self) -> WorkerState
fn clone(&self) -> WorkerState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WorkerState
Source§impl Debug for WorkerState
impl Debug for WorkerState
impl Eq for WorkerState
Source§impl From<WorkerState> for Candidate
impl From<WorkerState> for Candidate
Source§fn from(w: WorkerState) -> Self
fn from(w: WorkerState) -> Self
A work-cycle worker IS a hiring candidate — same fields. Lets HR rank the
exact roster work_cycle allocates over.
Source§impl PartialEq for WorkerState
impl PartialEq for WorkerState
Source§fn eq(&self, other: &WorkerState) -> bool
fn eq(&self, other: &WorkerState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WorkerState
Auto Trait Implementations§
impl Freeze for WorkerState
impl RefUnwindSafe for WorkerState
impl Send for WorkerState
impl Sync for WorkerState
impl Unpin for WorkerState
impl UnsafeUnpin for WorkerState
impl UnwindSafe for WorkerState
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