pub struct NpcView {
pub id: String,
pub label: String,
pub role: String,
pub x: f32,
pub y: f32,
pub building_id: Option<String>,
pub entity_id: Option<EntityId>,
pub life_state: Option<LifeState>,
pub hp_pct: Option<f32>,
}Fields§
§id: String§label: String§role: String§x: f32§y: f32§building_id: Option<String>Postcard always serializes optional fields (no skip_serializing_if) so decode stays aligned.
entity_id: Option<EntityId>Authoritative sim entity for wildlife / combat targets.
life_state: Option<LifeState>§hp_pct: Option<f32>Trait Implementations§
Source§impl<'de> Deserialize<'de> for NpcView
impl<'de> Deserialize<'de> for NpcView
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
impl StructuralPartialEq for NpcView
Auto Trait Implementations§
impl Freeze for NpcView
impl RefUnwindSafe for NpcView
impl Send for NpcView
impl Sync for NpcView
impl Unpin for NpcView
impl UnsafeUnpin for NpcView
impl UnwindSafe for NpcView
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