pub struct ShipEngine {
pub symbol: Symbol,
pub name: String,
pub description: String,
pub condition: Option<u32>,
pub speed: u32,
pub requirements: ShipRequirements,
}Expand description
The engine determines how quickly a ship travels between waypoints.
Fields§
§symbol: SymbolThe symbol of the engine.
name: StringThe name of the engine.
description: StringThe description of the engine.
condition: Option<u32>Condition is a range of 0 to 100 where 0 is completely worn out and 100 is brand new.
speed: u32The speed stat of this engine. The higher the speed, the faster a ship can travel from one point to another. Reduces the time of arrival when navigating the ship.
requirements: ShipRequirementsImplementations§
Source§impl ShipEngine
impl ShipEngine
Sourcepub fn new(
symbol: Symbol,
name: String,
description: String,
speed: u32,
requirements: ShipRequirements,
) -> ShipEngine
pub fn new( symbol: Symbol, name: String, description: String, speed: u32, requirements: ShipRequirements, ) -> ShipEngine
Create value with optional fields set to None.
Trait Implementations§
Source§impl Clone for ShipEngine
impl Clone for ShipEngine
Source§fn clone(&self) -> ShipEngine
fn clone(&self) -> ShipEngine
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 ShipEngine
impl Debug for ShipEngine
Source§impl<'de> Deserialize<'de> for ShipEngine
impl<'de> Deserialize<'de> for ShipEngine
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 ShipEngine
impl PartialEq for ShipEngine
Source§impl Serialize for ShipEngine
impl Serialize for ShipEngine
impl StructuralPartialEq for ShipEngine
Auto Trait Implementations§
impl Freeze for ShipEngine
impl RefUnwindSafe for ShipEngine
impl Send for ShipEngine
impl Sync for ShipEngine
impl Unpin for ShipEngine
impl UnwindSafe for ShipEngine
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