Enum neweden::SystemClass
source · pub enum SystemClass {
KSpace,
WSpace,
}
Expand description
Defines a system class. A system is either part of the known space (SystemClass::KSpace) or wormhole space (SystemClass::WSpace).
A System reference can be casted into this.
Example
use neweden::{System, Coordinate, SystemClass};
let jita = System {
id: 30000142.into(),
name: "Jita".to_string(),
coordinate: Coordinate {
x: -1.2906e+17_f64,
y: 6.07553e+16_f64,
z: 1.17469e+17_f64,
},
security: 0.9459.into(),
};
assert_eq!(SystemClass::from(&jita), SystemClass::KSpace);
Variants§
Trait Implementations§
source§impl Clone for SystemClass
impl Clone for SystemClass
source§fn clone(&self) -> SystemClass
fn clone(&self) -> SystemClass
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 SystemClass
impl Debug for SystemClass
source§impl From<&System> for SystemClass
impl From<&System> for SystemClass
source§impl From<System> for SystemClass
impl From<System> for SystemClass
source§impl PartialEq<SystemClass> for SystemClass
impl PartialEq<SystemClass> for SystemClass
source§fn eq(&self, other: &SystemClass) -> bool
fn eq(&self, other: &SystemClass) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SystemClass
impl StructuralEq for SystemClass
impl StructuralPartialEq for SystemClass
Auto Trait Implementations§
impl RefUnwindSafe for SystemClass
impl Send for SystemClass
impl Sync for SystemClass
impl Unpin for SystemClass
impl UnwindSafe for SystemClass
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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.