#[non_exhaustive]pub enum DamageKind {
None,
Flat {
amount: f64,
},
ApCoefficient {
coef: f64,
is_physical: bool,
},
SpCoefficient {
coef: f64,
is_physical: bool,
},
Weapon {
multiplier: f64,
flat_bonus: f64,
normalized: bool,
is_physical: bool,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for DamageKind
impl Clone for DamageKind
Source§fn clone(&self) -> DamageKind
fn clone(&self) -> DamageKind
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 moreSource§impl Debug for DamageKind
impl Debug for DamageKind
Source§impl<'de> Deserialize<'de> for DamageKind
impl<'de> Deserialize<'de> for DamageKind
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 Display for DamageKind
impl Display for DamageKind
Source§impl From<DamageKind> for JsValuewhere
DamageKind: Serialize,
impl From<DamageKind> for JsValuewhere
DamageKind: Serialize,
Source§fn from(value: DamageKind) -> Self
fn from(value: DamageKind) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
impl FromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &DamageKindwhere
DamageKind: Serialize,
impl IntoWasmAbi for &DamageKindwhere
DamageKind: Serialize,
Source§impl IntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
impl IntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
Source§impl OptionFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
impl OptionIntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
Source§impl PartialEq for DamageKind
impl PartialEq for DamageKind
Source§impl RefFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<DamageKind>
type Anchor = SelfOwner<DamageKind>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for DamageKind
impl Serialize for DamageKind
Source§impl Tsify for DamageKind
impl Tsify for DamageKind
const DECL: &'static str = "export type DamageKind = { type: \"None\" } | { type: \"Flat\"; amount: number } | { type: \"ApCoefficient\"; coef: number; is_physical: boolean } | { type: \"SpCoefficient\"; coef: number; is_physical: boolean } | { type: \"Weapon\"; multiplier: number; flat_bonus: number; normalized: boolean; is_physical: boolean };"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for DamageKindwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
impl VectorIntoWasmAbi for DamageKindwhere
DamageKind: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for DamageKind
impl WasmDescribe for DamageKind
Source§impl WasmDescribeVector for DamageKind
impl WasmDescribeVector for DamageKind
impl StructuralPartialEq for DamageKind
Auto Trait Implementations§
impl Freeze for DamageKind
impl RefUnwindSafe for DamageKind
impl Send for DamageKind
impl Sync for DamageKind
impl Unpin for DamageKind
impl UnsafeUnpin for DamageKind
impl UnwindSafe for DamageKind
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§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of [
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString]. Read more