pub struct ShipReactor {
pub symbol: Symbol,
pub name: String,
pub description: String,
pub condition: Option<u32>,
pub power_output: u32,
pub requirements: ShipRequirements,
}Expand description
The reactor of the ship. The reactor is responsible for powering the ship’s systems and weapons.
Fields§
§symbol: SymbolSymbol of the reactor.
name: StringName of the reactor.
description: StringDescription of the reactor.
condition: Option<u32>Condition is a range of 0 to 100 where 0 is completely worn out and 100 is brand new.
power_output: u32The amount of power provided by this reactor. The more power a reactor provides to the ship, the lower the cooldown it gets when using a module or mount that taxes the ship’s power.
requirements: ShipRequirementsImplementations§
Source§impl ShipReactor
impl ShipReactor
Sourcepub fn new(
symbol: Symbol,
name: String,
description: String,
power_output: u32,
requirements: ShipRequirements,
) -> ShipReactor
pub fn new( symbol: Symbol, name: String, description: String, power_output: u32, requirements: ShipRequirements, ) -> ShipReactor
Create value with optional fields set to None.
Trait Implementations§
Source§impl Clone for ShipReactor
impl Clone for ShipReactor
Source§fn clone(&self) -> ShipReactor
fn clone(&self) -> ShipReactor
Returns a duplicate of the value. Read more
1.0.0 · 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 ShipReactor
impl Debug for ShipReactor
Source§impl<'de> Deserialize<'de> for ShipReactor
impl<'de> Deserialize<'de> for ShipReactor
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 ShipReactor
impl PartialEq for ShipReactor
Source§impl Serialize for ShipReactor
impl Serialize for ShipReactor
impl StructuralPartialEq for ShipReactor
Auto Trait Implementations§
impl Freeze for ShipReactor
impl RefUnwindSafe for ShipReactor
impl Send for ShipReactor
impl Sync for ShipReactor
impl Unpin for ShipReactor
impl UnwindSafe for ShipReactor
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