Enum neweden::SecurityClass
source · pub enum SecurityClass {
Highsec,
Lowsec,
Nullsec,
}
Expand description
Describes if a system’s security rating is considered Highsec, Lowsec or Nullsec. In Eve Online, 1.0 t 0.45 is considered highsec. 0.0 to 0.45 is considered lowsec, and below 0.0 is considered nullsec.
A security instance can be converted into a SecurityClass.
Example
use neweden::{Security, SecurityClass};
let s1 = Security(0.443);
let sc1: SecurityClass = s1.into();
assert_eq!(sc1, SecurityClass::Lowsec);
let s2 = Security(-0.24);
assert_eq!(SecurityClass::from(s2), SecurityClass::Nullsec);
let s3 = Security(0.74);
assert_eq!(SecurityClass::from(s3), SecurityClass::Highsec);
Variants§
Trait Implementations§
source§impl Clone for SecurityClass
impl Clone for SecurityClass
source§fn clone(&self) -> SecurityClass
fn clone(&self) -> SecurityClass
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 SecurityClass
impl Debug for SecurityClass
source§impl From<&Security> for SecurityClass
impl From<&Security> for SecurityClass
source§impl From<Security> for SecurityClass
impl From<Security> for SecurityClass
source§impl PartialEq<SecurityClass> for SecurityClass
impl PartialEq<SecurityClass> for SecurityClass
source§fn eq(&self, other: &SecurityClass) -> bool
fn eq(&self, other: &SecurityClass) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SecurityClass
impl StructuralEq for SecurityClass
impl StructuralPartialEq for SecurityClass
Auto Trait Implementations§
impl RefUnwindSafe for SecurityClass
impl Send for SecurityClass
impl Sync for SecurityClass
impl Unpin for SecurityClass
impl UnwindSafe for SecurityClass
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.