Skip to main content

FitItem

Struct FitItem 

Source
pub struct FitItem {
    pub type_id: i32,
    pub slot: Slot,
    pub quantity: u32,
    pub state: State,
    pub charge: Option<Charge>,
    pub mutation: Option<Mutation>,
    pub fighter_abilities: Option<BTreeSet<i32>>,
    pub booster_side_effects: BTreeSet<i32>,
    pub spool: Option<Spool>,
}
Expand description

A module, drone, fighter squadron, implant, booster or item in cargo.

Fields§

§type_id: i32

The type id of the item.

§slot: Slot

Where the item is.

§quantity: u32

1 for modules. Stack size for drones, fighters and cargo; for fighters in a tube, the size of the squadron.

§state: State

The state asked for; the calculation lowers it when the item cannot reach it.

§charge: Option<Charge>

The charge loaded in the module, if any.

§mutation: Option<Mutation>

Only for mutated modules and drones.

§fighter_abilities: Option<BTreeSet<i32>>

Only for fighters: the abilities used, by effect id. None uses the abilities the fighter uses by default.

§booster_side_effects: BTreeSet<i32>

Only for boosters: the side effects rolled, by effect id. Empty means none.

§spool: Option<Spool>

How far a module whose bonus grows every cycle has spooled. Only per-second stats use it; volley is always unspooled. None is fully spooled.

Trait Implementations§

Source§

impl Clone for FitItem

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FitItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for FitItem

Source§

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 Serialize for FitItem

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.