pub struct ShipStatus {
pub pips: [u8; 3],
pub fire_group: u8,
pub gui_focus: GuiFocus,
pub fuel: FuelStatus,
pub cargo: f32,
pub destination: Option<DestinationStatus>,
}
Expand description
This model contains the fields which are included when the player is piloting a ship.
Fields§
§pips: [u8; 3]
The current status of the pips of the ship.
fire_group: u8
The number of the fire-group which is currently selected.
gui_focus: GuiFocus
Which GUI currently has focus in the ship.
fuel: FuelStatus
Information about the fuel of the current ship.
cargo: f32
The number of tonnes of cargo the ship has on board.
destination: Option<DestinationStatus>
Information about the currently targeted destination.
Implementations§
Source§impl ShipStatus
impl ShipStatus
Sourcepub fn system_pips(&self) -> u8
pub fn system_pips(&self) -> u8
Returns the current number of pips that are set for the system category.
Sourcepub fn engine_pips(&self) -> u8
pub fn engine_pips(&self) -> u8
Returns the current number of pips that are set for the engine category.
Sourcepub fn weapon_pips(&self) -> u8
pub fn weapon_pips(&self) -> u8
Returns the current number of pips that are set for the weapon category.
Trait Implementations§
Source§impl Clone for ShipStatus
impl Clone for ShipStatus
Source§fn clone(&self) -> ShipStatus
fn clone(&self) -> ShipStatus
Returns a copy 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 ShipStatus
impl Debug for ShipStatus
Source§impl<'de> Deserialize<'de> for ShipStatus
impl<'de> Deserialize<'de> for ShipStatus
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 ShipStatus
impl PartialEq for ShipStatus
Source§impl Serialize for ShipStatus
impl Serialize for ShipStatus
impl StructuralPartialEq for ShipStatus
Auto Trait Implementations§
impl Freeze for ShipStatus
impl RefUnwindSafe for ShipStatus
impl Send for ShipStatus
impl Sync for ShipStatus
impl Unpin for ShipStatus
impl UnwindSafe for ShipStatus
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