pub struct Item {
pub id: Uuid,
pub item_template_id: ItemTemplateId,
pub item_type: ItemType,
pub rarity: ItemRarity,
pub level: i64,
pub name: I18nString,
pub icon_url: String,
pub icon_path: String,
pub is_equipped: bool,
pub price: Vec<CurrencyUnit>,
pub experience: i64,
pub attributes: Vec<ItemAttribute>,
}Fields§
§id: Uuid§item_template_id: ItemTemplateId§item_type: ItemType§rarity: ItemRarity§level: i64§name: I18nString§icon_url: String§icon_path: String§is_equipped: bool§price: Vec<CurrencyUnit>§experience: i64§attributes: Vec<ItemAttribute>Trait Implementations§
Source§impl CustomType for Item
impl CustomType for Item
Source§fn build(builder: TypeBuilder<'_, Self>)
fn build(builder: TypeBuilder<'_, Self>)
Builds the custom type for use with the [
Engine]. Read moreSource§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
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 Itemwhere
Self: DeserializeOwned,
impl FromWasmAbi for Itemwhere
Self: DeserializeOwned,
Source§impl JsonSchema for Item
impl JsonSchema for Item
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 Itemwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for Itemwhere
Self: DeserializeOwned,
Source§impl RefFromWasmAbi for Itemwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for Itemwhere
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§impl Tsify for Item
impl Tsify for Item
const DECL: &'static str = "export interface Item {\n id: Uuid;\n item_template_id: ItemTemplateId;\n item_type: ItemType;\n rarity: ItemRarity;\n level: number;\n name: I18nString;\n icon_url: string;\n icon_path: string;\n is_equipped: boolean;\n price: CurrencyUnit[];\n experience: number;\n attributes: ItemAttribute[];\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 Itemwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for Itemwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more