pub struct AbilityRef { /* private fields */ }Expand description
The canonical, serializable identity of an ability record.
Implementations§
Source§impl AbilityRef
impl AbilityRef
pub fn new( hero: HeroId, slot: LogicalSlot, variant: Option<AbilityVariant>, ) -> Self
pub fn hero(&self) -> &HeroId
pub fn slot(&self) -> &LogicalSlot
pub fn variant(&self) -> Option<&AbilityVariant>
Trait Implementations§
Source§impl Clone for AbilityRef
impl Clone for AbilityRef
Source§fn clone(&self) -> AbilityRef
fn clone(&self) -> AbilityRef
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 moreSource§impl Debug for AbilityRef
impl Debug for AbilityRef
Source§impl<'de> Deserialize<'de> for AbilityRef
impl<'de> Deserialize<'de> for AbilityRef
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
impl Eq for AbilityRef
Source§impl Hash for AbilityRef
impl Hash for AbilityRef
Source§impl Ord for AbilityRef
impl Ord for AbilityRef
Source§fn cmp(&self, other: &AbilityRef) -> Ordering
fn cmp(&self, other: &AbilityRef) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for AbilityRef
impl PartialEq for AbilityRef
Source§impl PartialOrd for AbilityRef
impl PartialOrd for AbilityRef
Source§impl Serialize for AbilityRef
impl Serialize for AbilityRef
impl StructuralPartialEq for AbilityRef
Auto Trait Implementations§
impl Freeze for AbilityRef
impl RefUnwindSafe for AbilityRef
impl Send for AbilityRef
impl Sync for AbilityRef
impl Unpin for AbilityRef
impl UnsafeUnpin for AbilityRef
impl UnwindSafe for AbilityRef
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