#[repr(u8)]pub enum Affinity {
Friend = 0,
Foe = 1,
Unknown,
Invalid(u8),
}
Expand description
Whether the agent is an ally or enemy.
Arc calls this “iff” for if friend/foe.
Variants§
Friend = 0
Allied agent.
Foe = 1
Enemy agent.
Unknown
Unknown affinity between agents.
Invalid(u8)
Invalid.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Affinity
impl<'de> Deserialize<'de> for Affinity
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 FromPrimitive for Affinity
impl FromPrimitive for Affinity
source§impl Ord for Affinity
impl Ord for Affinity
source§impl PartialEq for Affinity
impl PartialEq for Affinity
source§impl PartialOrd for Affinity
impl PartialOrd for Affinity
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Affinity
impl Eq for Affinity
impl StructuralPartialEq for Affinity
Auto Trait Implementations§
impl Freeze for Affinity
impl RefUnwindSafe for Affinity
impl Send for Affinity
impl Sync for Affinity
impl Unpin for Affinity
impl UnwindSafe for Affinity
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