pub struct OwnedAbilityStone {
pub template_id: AbilityStoneId,
pub level: i64,
pub copies: i64,
}Expand description
One owned ability-stone stack. Upgrades are paid in RAW COPIES of the same stone (the copies’ own level is irrelevant), so ownership is a per-template stack, not a bag of instances.
Fields§
§template_id: AbilityStoneId§level: i64§copies: i64Raw copies held toward the next level.
Implementations§
Source§impl OwnedAbilityStone
impl OwnedAbilityStone
pub fn new(template_id: AbilityStoneId) -> Self
Trait Implementations§
Source§impl Clone for OwnedAbilityStone
impl Clone for OwnedAbilityStone
Source§fn clone(&self) -> OwnedAbilityStone
fn clone(&self) -> OwnedAbilityStone
Returns a copy 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 OwnedAbilityStone
impl Debug for OwnedAbilityStone
Source§impl<'de> Deserialize<'de> for OwnedAbilityStone
impl<'de> Deserialize<'de> for OwnedAbilityStone
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 FromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
impl FromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
Source§impl JsonSchema for OwnedAbilityStone
impl JsonSchema for OwnedAbilityStone
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl OptionFromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
Source§impl PartialEq for OwnedAbilityStone
impl PartialEq for OwnedAbilityStone
Source§impl RefFromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
impl RefFromWasmAbi for OwnedAbilityStonewhere
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<OwnedAbilityStone>
type Anchor = SelfOwner<OwnedAbilityStone>
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 OwnedAbilityStone
impl Serialize for OwnedAbilityStone
Source§impl Tsify for OwnedAbilityStone
impl Tsify for OwnedAbilityStone
const DECL: &'static str = "/**\n * One owned ability-stone stack. Upgrades are paid in RAW COPIES of the same\n * stone (the copies\\\' own level is irrelevant), so ownership is a per-template\n * stack, not a bag of instances.\n */\nexport interface OwnedAbilityStone {\n template_id: AbilityStoneId;\n level: number;\n /**\n * Raw copies held toward the next level.\n */\n copies: 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 OwnedAbilityStonewhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for OwnedAbilityStonewhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for OwnedAbilityStone
impl WasmDescribeVector for OwnedAbilityStone
impl Eq for OwnedAbilityStone
impl StructuralPartialEq for OwnedAbilityStone
Auto Trait Implementations§
impl Freeze for OwnedAbilityStone
impl RefUnwindSafe for OwnedAbilityStone
impl Send for OwnedAbilityStone
impl Sync for OwnedAbilityStone
impl Unpin for OwnedAbilityStone
impl UnwindSafe for OwnedAbilityStone
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