pub struct UnitComposition {
pub game_version: GameVersionRef,
pub models: Vec<UnitCompositionModelsItem>,
pub unit_id: EntityId,
}Expand description
Describes the internal model-type breakdown of a unit.
JSON schema
{
"title": "Unit Composition",
"description": "Describes the internal model-type breakdown of a unit.",
"type": "object",
"required": [
"game_version",
"models",
"unit_id"
],
"properties": {
"game_version": {
"$ref": "#/$defs/game-version-ref"
},
"models": {
"type": "array",
"items": {
"type": "object",
"required": [
"max",
"min",
"name"
],
"properties": {
"base_size_mm": {
"description": "This model's base. Absent when no base could be resolved for the model.",
"$ref": "#/$defs/base-size"
},
"default_weapon_ids": {
"type": "array",
"items": {
"$ref": "#/$defs/entity-id"
}
},
"is_leader_model": {
"default": false,
"type": "boolean"
},
"max": {
"type": "integer",
"minimum": 1.0
},
"min": {
"type": "integer",
"minimum": 0.0
},
"name": {
"type": "string",
"minLength": 1
},
"profile_name": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"minItems": 1
},
"unit_id": {
"$ref": "#/$defs/entity-id"
}
},
"additionalProperties": false
}Fields§
§game_version: GameVersionRef§models: Vec<UnitCompositionModelsItem>§unit_id: EntityIdTrait Implementations§
Source§impl Clone for UnitComposition
impl Clone for UnitComposition
Source§fn clone(&self) -> UnitComposition
fn clone(&self) -> UnitComposition
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 UnitComposition
impl Debug for UnitComposition
Source§impl<'de> Deserialize<'de> for UnitComposition
impl<'de> Deserialize<'de> for UnitComposition
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 UnitComposition
impl PartialEq for UnitComposition
Source§fn eq(&self, other: &UnitComposition) -> bool
fn eq(&self, other: &UnitComposition) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for UnitComposition
impl Serialize for UnitComposition
impl StructuralPartialEq for UnitComposition
Auto Trait Implementations§
impl Freeze for UnitComposition
impl RefUnwindSafe for UnitComposition
impl Send for UnitComposition
impl Sync for UnitComposition
impl Unpin for UnitComposition
impl UnsafeUnpin for UnitComposition
impl UnwindSafe for UnitComposition
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