pub struct HiredWorkerView {Show 22 fields
pub instance_id: String,
pub entity_id: EntityId,
pub def_id: String,
pub label: String,
pub x: f32,
pub y: f32,
pub z: f32,
pub mode: WorkerModeView,
pub state: WorkerStateView,
pub step_label: String,
pub vitals: WorkerVitalsSummary,
pub carry_pct: f32,
pub last_error: Option<String>,
pub wage_copper_per_interval: u32,
pub effective_wage_copper: u32,
pub wage_meters_walked: f32,
pub lodging_container_id: Option<String>,
pub route: Option<WorkerRouteView>,
pub known_blueprint_ids: Vec<String>,
pub level: u32,
pub worker_xp: f64,
pub inventory: Vec<ItemStack>,
}Expand description
One player-hired worker visible in snapshot / tick deltas.
Fields§
§instance_id: String§entity_id: EntityId§def_id: String§label: StringDisplay label (custom name when set, otherwise the NPC def label).
x: f32§y: f32§z: f32§mode: WorkerModeView§state: WorkerStateView§step_label: String§vitals: WorkerVitalsSummary§carry_pct: f32§last_error: Option<String>§wage_copper_per_interval: u32§effective_wage_copper: u32Estimated wage this interval (base + loop effort, travel meters excluded).
wage_meters_walked: f32Meters walked toward the next wage debit.
lodging_container_id: Option<String>Placed camp bed / lodging container this worker uses for deposit and rest.
route: Option<WorkerRouteView>High-level harvest route (when job_loop route is configured).
known_blueprint_ids: Vec<String>Recipes this worker already knows (from hire teaches + employer teach).
level: u32Overall worker level (1+).
worker_xp: f64Cumulative worker XP.
inventory: Vec<ItemStack>Items the worker currently carries (employer-visible for give/take).
Trait Implementations§
Source§impl Clone for HiredWorkerView
impl Clone for HiredWorkerView
Source§fn clone(&self) -> HiredWorkerView
fn clone(&self) -> HiredWorkerView
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 moreSource§impl Debug for HiredWorkerView
impl Debug for HiredWorkerView
Source§impl<'de> Deserialize<'de> for HiredWorkerView
impl<'de> Deserialize<'de> for HiredWorkerView
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
Source§impl PartialEq for HiredWorkerView
impl PartialEq for HiredWorkerView
Source§impl Serialize for HiredWorkerView
impl Serialize for HiredWorkerView
impl StructuralPartialEq for HiredWorkerView
Auto Trait Implementations§
impl Freeze for HiredWorkerView
impl RefUnwindSafe for HiredWorkerView
impl Send for HiredWorkerView
impl Sync for HiredWorkerView
impl Unpin for HiredWorkerView
impl UnsafeUnpin for HiredWorkerView
impl UnwindSafe for HiredWorkerView
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