pub struct BattlerRef {
pub side: u8,
pub slot: u8,
}Expand description
A reference to one battler position on the battlefield.
In a 1v1 Gen-1-style battle slot is always 0; the field is present so
the same type serves multi-slot formats. side is 0 for the player and
1 for the opponent, matching BattleState::player_battlers /
opponent_battlers.
Fields§
§side: u80 = player side, 1 = opponent side.
slot: u8Slot within the side (0-based). 0 for 1v1.
Implementations§
Trait Implementations§
Source§impl Clone for BattlerRef
impl Clone for BattlerRef
Source§fn clone(&self) -> BattlerRef
fn clone(&self) -> BattlerRef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BattlerRef
Source§impl Debug for BattlerRef
impl Debug for BattlerRef
impl Eq for BattlerRef
Source§impl From<BattlerRef> for EffectHost
impl From<BattlerRef> for EffectHost
Source§fn from(r: BattlerRef) -> Self
fn from(r: BattlerRef) -> Self
Converts to this type from the input type.
Source§impl PartialEq for BattlerRef
impl PartialEq for BattlerRef
Source§impl PartialEq<BattlerRef> for EffectHost
impl PartialEq<BattlerRef> for EffectHost
Source§impl PartialEq<EffectHost> for BattlerRef
impl PartialEq<EffectHost> for BattlerRef
impl StructuralPartialEq for BattlerRef
Auto Trait Implementations§
impl Freeze for BattlerRef
impl RefUnwindSafe for BattlerRef
impl Send for BattlerRef
impl Sync for BattlerRef
impl Unpin for BattlerRef
impl UnsafeUnpin for BattlerRef
impl UnwindSafe for BattlerRef
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