pub struct WeaponDamage {
pub main_min: f64,
pub main_max: f64,
pub main_speed: f64,
pub off_min: f64,
pub off_max: f64,
pub off_speed: f64,
}Expand description
Weapon damage and speed; source for $mws/$mwb/$ows/$owb.
Fields§
§main_min: f64§main_max: f64§main_speed: f64§off_min: f64§off_max: f64§off_speed: f64Trait Implementations§
Source§impl Clone for WeaponDamage
impl Clone for WeaponDamage
Source§fn clone(&self) -> WeaponDamage
fn clone(&self) -> WeaponDamage
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 WeaponDamage
impl Debug for WeaponDamage
Source§impl Default for WeaponDamage
impl Default for WeaponDamage
Source§fn default() -> WeaponDamage
fn default() -> WeaponDamage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WeaponDamage
impl<'de> Deserialize<'de> for WeaponDamage
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 From<WeaponDamage> for JsValuewhere
WeaponDamage: Serialize,
impl From<WeaponDamage> for JsValuewhere
WeaponDamage: Serialize,
Source§fn from(value: WeaponDamage) -> Self
fn from(value: WeaponDamage) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
impl FromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for &WeaponDamagewhere
WeaponDamage: Serialize,
impl IntoWasmAbi for &WeaponDamagewhere
WeaponDamage: Serialize,
Source§impl IntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
impl IntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
Source§impl OptionFromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
impl OptionIntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
Source§impl RefFromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for WeaponDamagewhere
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<WeaponDamage>
type Anchor = SelfOwner<WeaponDamage>
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 WeaponDamage
impl Serialize for WeaponDamage
Source§impl Tsify for WeaponDamage
impl Tsify for WeaponDamage
const DECL: &'static str = "/**\n * Weapon damage and speed; source for `$mws`/`$mwb`/`$ows`/`$owb`.\n */\nexport interface WeaponDamage {\n main_min: number;\n main_max: number;\n main_speed: number;\n off_min: number;\n off_max: number;\n off_speed: number;\n}"
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 WeaponDamagewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for WeaponDamagewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
impl VectorIntoWasmAbi for WeaponDamagewhere
WeaponDamage: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribe for WeaponDamage
impl WasmDescribe for WeaponDamage
Source§impl WasmDescribeVector for WeaponDamage
impl WasmDescribeVector for WeaponDamage
Auto Trait Implementations§
impl Freeze for WeaponDamage
impl RefUnwindSafe for WeaponDamage
impl Send for WeaponDamage
impl Sync for WeaponDamage
impl Unpin for WeaponDamage
impl UnsafeUnpin for WeaponDamage
impl UnwindSafe for WeaponDamage
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.