pub struct UnitDefinition {Show 26 fields
pub id: i32,
pub is_valid: Option<bool>,
pub pos_x: Option<i32>,
pub pos_y: Option<i32>,
pub pos_z: Option<i32>,
pub race: Option<MatPair>,
pub profession_color: Option<ColorDefinition>,
pub flags1: Option<u32>,
pub flags2: Option<u32>,
pub flags3: Option<u32>,
pub is_soldier: Option<bool>,
pub size_info: Option<BodySizeInfo>,
pub name: Option<String>,
pub blood_max: Option<i32>,
pub blood_count: Option<i32>,
pub appearance: Option<UnitAppearance>,
pub profession_id: Option<i32>,
pub noble_positions: Vec<String>,
pub rider_id: Option<i32>,
pub inventory: Vec<InventoryItem>,
pub subpos_x: Option<f32>,
pub subpos_y: Option<f32>,
pub subpos_z: Option<f32>,
pub facing: Option<Coord>,
pub age: Option<i32>,
pub wounds: Vec<UnitWound>,
}Fields§
§id: i32§is_valid: Option<bool>§pos_x: Option<i32>§pos_y: Option<i32>§pos_z: Option<i32>§race: Option<MatPair>§profession_color: Option<ColorDefinition>§flags1: Option<u32>§flags2: Option<u32>§flags3: Option<u32>§is_soldier: Option<bool>§size_info: Option<BodySizeInfo>§name: Option<String>§blood_max: Option<i32>§blood_count: Option<i32>§appearance: Option<UnitAppearance>§profession_id: Option<i32>§noble_positions: Vec<String>§rider_id: Option<i32>§inventory: Vec<InventoryItem>§subpos_x: Option<f32>§subpos_y: Option<f32>§subpos_z: Option<f32>§facing: Option<Coord>§age: Option<i32>§wounds: Vec<UnitWound>Implementations§
Source§impl UnitDefinition
impl UnitDefinition
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns the value of is_valid, or the default value if is_valid is unset.
Sourcepub fn flags1(&self) -> u32
pub fn flags1(&self) -> u32
Returns the value of flags1, or the default value if flags1 is unset.
Sourcepub fn flags2(&self) -> u32
pub fn flags2(&self) -> u32
Returns the value of flags2, or the default value if flags2 is unset.
Sourcepub fn flags3(&self) -> u32
pub fn flags3(&self) -> u32
Returns the value of flags3, or the default value if flags3 is unset.
Sourcepub fn is_soldier(&self) -> bool
pub fn is_soldier(&self) -> bool
Returns the value of is_soldier, or the default value if is_soldier is unset.
Sourcepub fn blood_max(&self) -> i32
pub fn blood_max(&self) -> i32
Returns the value of blood_max, or the default value if blood_max is unset.
Sourcepub fn blood_count(&self) -> i32
pub fn blood_count(&self) -> i32
Returns the value of blood_count, or the default value if blood_count is unset.
Sourcepub fn profession_id(&self) -> i32
pub fn profession_id(&self) -> i32
Returns the value of profession_id, or the default value if profession_id is unset.
Sourcepub fn rider_id(&self) -> i32
pub fn rider_id(&self) -> i32
Returns the value of rider_id, or the default value if rider_id is unset.
Sourcepub fn subpos_x(&self) -> f32
pub fn subpos_x(&self) -> f32
Returns the value of subpos_x, or the default value if subpos_x is unset.
Sourcepub fn subpos_y(&self) -> f32
pub fn subpos_y(&self) -> f32
Returns the value of subpos_y, or the default value if subpos_y is unset.
Trait Implementations§
Source§impl Clone for UnitDefinition
impl Clone for UnitDefinition
Source§fn clone(&self) -> UnitDefinition
fn clone(&self) -> UnitDefinition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnitDefinition
impl Debug for UnitDefinition
Source§impl Default for UnitDefinition
impl Default for UnitDefinition
Source§impl Message for UnitDefinition
impl Message for UnitDefinition
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Name for UnitDefinition
impl Name for UnitDefinition
Source§const NAME: &'static str = "UnitDefinition"
const NAME: &'static str = "UnitDefinition"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "RemoteFortressReader"
const PACKAGE: &'static str = "RemoteFortressReader"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.