pub struct EquippedPets {
pub slotted: BTreeMap<PetSlotId, Pet>,
}Fields§
§slotted: BTreeMap<PetSlotId, Pet>Implementations§
Source§impl EquippedPets
impl EquippedPets
pub fn new() -> Self
pub fn leader(&self) -> Option<&Pet>
pub fn supports(&self) -> Vec<&Pet>
pub fn all_pets(&self) -> Vec<&Pet>
pub fn slot_type(slot_id: PetSlotId) -> PetSlotType
pub fn has_pet(&self, pet_id: PetId) -> bool
pub fn get_mut_by_id(&mut self, pet_id: PetId) -> Option<&mut Pet>
Trait Implementations§
Source§impl Clone for EquippedPets
impl Clone for EquippedPets
Source§fn clone(&self) -> EquippedPets
fn clone(&self) -> EquippedPets
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 CustomType for EquippedPets
impl CustomType for EquippedPets
Source§fn build(builder: TypeBuilder<'_, Self>)
fn build(builder: TypeBuilder<'_, Self>)
Builds the custom type for use with the [
Engine]. Read moreSource§impl Debug for EquippedPets
impl Debug for EquippedPets
Source§impl Default for EquippedPets
impl Default for EquippedPets
Source§fn default() -> EquippedPets
fn default() -> EquippedPets
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EquippedPets
impl<'de> Deserialize<'de> for EquippedPets
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 EquippedPetswhere
Self: DeserializeOwned,
impl FromWasmAbi for EquippedPetswhere
Self: DeserializeOwned,
Source§impl JsonSchema for EquippedPets
impl JsonSchema for EquippedPets
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 EquippedPetswhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for EquippedPetswhere
Self: DeserializeOwned,
Source§impl PartialEq for EquippedPets
impl PartialEq for EquippedPets
Source§impl RefFromWasmAbi for EquippedPetswhere
Self: DeserializeOwned,
impl RefFromWasmAbi for EquippedPetswhere
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<EquippedPets>
type Anchor = SelfOwner<EquippedPets>
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 EquippedPets
impl Serialize for EquippedPets
Source§impl Tsify for EquippedPets
impl Tsify for EquippedPets
const DECL: &'static str = "export interface EquippedPets {\n slotted: Record<PetSlotId, Pet>;\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 EquippedPetswhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for EquippedPetswhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for EquippedPets
impl WasmDescribeVector for EquippedPets
impl Eq for EquippedPets
impl StructuralPartialEq for EquippedPets
Auto Trait Implementations§
impl Freeze for EquippedPets
impl RefUnwindSafe for EquippedPets
impl Send for EquippedPets
impl Sync for EquippedPets
impl Unpin for EquippedPets
impl UnwindSafe for EquippedPets
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