Skip to main content

Rule

Enum Rule 

Source
#[non_exhaustive]
pub enum Rule {
Show 16 variants Resource { resource: Resource, used: f64, available: f64, }, Slots { slot: SlotKind, used: u32, available: u32, }, WrongSlot { expected: SlotKind, }, SlotTaken, WrongSlotIndex { expected: u16, }, SubsystemTaken, Skill { type_id: i32, required: u8, level: u8, }, RigSize { ship: u8, item: u8, }, ShipRestricted, CapitalItem, StructureItem, ShipItem, MaxGroup { group_id: i32, limit: GroupLimit, used: u32, allowed: u32, }, MaxType { type_id: i32, used: u32, allowed: u32, }, ChargeGroup, ChargeSize { module: u8, charge: u8, },
}
Expand description

A rule of EVE’s, and the values that failed it.

What an item would accept instead is not repeated here; it is on the item itself, as chargeGroup1, canFitShipType1 and the like.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Resource

More of a fitting resource used than the ship has.

Fields

§resource: Resource

Which resource ran out.

§used: f64

How much is used.

§available: f64

How much there is.

§

Slots

More items in a rack than the ship has slots.

Fields

§slot: SlotKind

Which rack is full.

§used: u32

How many items are in it.

§available: u32

How many fit.

§

WrongSlot

The item belongs in another kind of slot.

Fields

§expected: SlotKind

The rack the item asks for.

§

SlotTaken

Another item of the fit is in this slot too.

§

WrongSlotIndex

An implant or booster in a slot other than the one it occupies. The number is implantness or boosterness.

Fields

§expected: u16

The slot the item belongs in.

§

SubsystemTaken

Another subsystem covers the same part of the ship.

§

Skill

A skill the character is missing, or has not trained far enough.

Fields

§type_id: i32

The type id of the skill.

§required: u8

The level the item asks for.

§level: u8

The level the character has; 0 when untrained.

§

RigSize

A rig of another size than the ship takes.

Fields

§ship: u8

The size the ship takes.

§item: u8

The size of the rig.

§

ShipRestricted

The item cannot go on this ship at all.

§

CapitalItem

A capital item on a ship that is not a capital.

§

StructureItem

A structure module on something that is not a structure.

§

ShipItem

A module of a ship on a structure.

§

MaxGroup

More of a group than the ship may hold in that state.

Fields

§group_id: i32

The group the limit is on.

§limit: GroupLimit

The state the limit counts.

§used: u32

How many are in that state.

§allowed: u32

How many may be.

§

MaxType

More of one type fitted than allowed.

Fields

§type_id: i32

The type the limit is on.

§used: u32

How many are fitted.

§allowed: u32

How many may be.

§

ChargeGroup

A charge of a group the module does not take.

§

ChargeSize

A charge of another size than the module takes.

Fields

§module: u8

The size the module takes.

§charge: u8

The size of the charge.

Trait Implementations§

Source§

impl Clone for Rule

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 Copy for Rule

Source§

impl Debug for Rule

Source§

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

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

impl PartialEq for Rule

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Rule

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
Source§

impl StructuralPartialEq for Rule

Auto Trait Implementations§

§

impl Freeze for Rule

§

impl RefUnwindSafe for Rule

§

impl Send for Rule

§

impl Sync for Rule

§

impl Unpin for Rule

§

impl UnsafeUnpin for Rule

§

impl UnwindSafe for Rule

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> 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.