pub struct WeightedAttack<A: Clone + Eq> {
pub attacker: A,
pub target: A,
pub weight: AttackWeight,
}Expand description
A weighted directed attack edge: attacker attacks target with
the given weight.
Generic over argument type A to match the core crate’s convention.
Fields§
§attacker: AThe attacking argument.
target: AThe target argument.
weight: AttackWeightThe attack weight. Higher weights are harder to tolerate.
Implementations§
Trait Implementations§
Source§impl<A: Clone + Clone + Eq> Clone for WeightedAttack<A>
impl<A: Clone + Clone + Eq> Clone for WeightedAttack<A>
Source§fn clone(&self) -> WeightedAttack<A>
fn clone(&self) -> WeightedAttack<A>
Returns a duplicate 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 moreimpl<A: Clone + Eq> StructuralPartialEq for WeightedAttack<A>
Auto Trait Implementations§
impl<A> Freeze for WeightedAttack<A>where
A: Freeze,
impl<A> RefUnwindSafe for WeightedAttack<A>where
A: RefUnwindSafe,
impl<A> Send for WeightedAttack<A>where
A: Send,
impl<A> Sync for WeightedAttack<A>where
A: Sync,
impl<A> Unpin for WeightedAttack<A>where
A: Unpin,
impl<A> UnsafeUnpin for WeightedAttack<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for WeightedAttack<A>where
A: UnwindSafe,
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