#[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§
§impl<'de> Deserialize<'de> for Affinity
impl<'de> Deserialize<'de> for Affinity
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Affinity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Affinity, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl IntoEnumIterator for Affinity
impl IntoEnumIterator for Affinity
type Iterator = AffinityIter
fn iter() -> AffinityIter ⓘ
§impl Ord for Affinity
impl Ord for Affinity
§impl PartialOrd for Affinity
impl PartialOrd for Affinity
§impl Serialize for Affinity
impl Serialize for Affinity
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)