pub struct ShipModule {
pub capacity: Option<u64>,
pub description: String,
pub name: String,
pub range: Option<u64>,
pub requirements: ShipRequirements,
pub symbol: ShipModuleSymbol,
}Expand description
A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew. Module installations are permanent.
JSON schema
{
"description": "A module can be installed in a ship and provides a set of capabilities such as storage space or quarters for crew. Module installations are permanent.",
"type": "object",
"required": [
"description",
"name",
"requirements",
"symbol"
],
"properties": {
"capacity": {
"description": "Modules that provide capacity, such as cargo hold or crew quarters will show this value to denote how much of a bonus the module grants.",
"type": "integer",
"minimum": 0.0
},
"description": {
"description": "Description of this module.",
"type": "string"
},
"name": {
"description": "Name of this module.",
"type": "string"
},
"range": {
"description": "Modules that have a range will such as a sensor array show this value to denote how far can the module reach with its capabilities.",
"type": "integer",
"minimum": 0.0
},
"requirements": {
"$ref": "#/components/schemas/ShipRequirements"
},
"symbol": {
"description": "The symbol of the module.",
"type": "string",
"enum": [
"MODULE_MINERAL_PROCESSOR_I",
"MODULE_GAS_PROCESSOR_I",
"MODULE_CARGO_HOLD_I",
"MODULE_CARGO_HOLD_II",
"MODULE_CARGO_HOLD_III",
"MODULE_CREW_QUARTERS_I",
"MODULE_ENVOY_QUARTERS_I",
"MODULE_PASSENGER_CABIN_I",
"MODULE_MICRO_REFINERY_I",
"MODULE_ORE_REFINERY_I",
"MODULE_FUEL_REFINERY_I",
"MODULE_SCIENCE_LAB_I",
"MODULE_JUMP_DRIVE_I",
"MODULE_JUMP_DRIVE_II",
"MODULE_JUMP_DRIVE_III",
"MODULE_WARP_DRIVE_I",
"MODULE_WARP_DRIVE_II",
"MODULE_WARP_DRIVE_III",
"MODULE_SHIELD_GENERATOR_I",
"MODULE_SHIELD_GENERATOR_II"
]
}
}
}Fields§
§capacity: Option<u64>Modules that provide capacity, such as cargo hold or crew quarters will show this value to denote how much of a bonus the module grants.
description: StringDescription of this module.
name: StringName of this module.
range: Option<u64>Modules that have a range will such as a sensor array show this value to denote how far can the module reach with its capabilities.
requirements: ShipRequirements§symbol: ShipModuleSymbolThe symbol of the module.
Trait Implementations§
Source§impl Clone for ShipModule
impl Clone for ShipModule
Source§fn clone(&self) -> ShipModule
fn clone(&self) -> ShipModule
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 ShipModule
impl Debug for ShipModule
Source§impl<'de> Deserialize<'de> for ShipModule
impl<'de> Deserialize<'de> for ShipModule
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
Auto Trait Implementations§
impl Freeze for ShipModule
impl RefUnwindSafe for ShipModule
impl Send for ShipModule
impl Sync for ShipModule
impl Unpin for ShipModule
impl UnsafeUnpin for ShipModule
impl UnwindSafe for ShipModule
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