Struct rscache::definition::osrs::ObjectDefinition
source · [−]pub struct ObjectDefinition {Show 20 fields
pub id: u16,
pub name: String,
pub config_id: Option<u16>,
pub map_area_id: Option<u16>,
pub map_scene_id: u16,
pub animation_id: u16,
pub solid: bool,
pub shadow: bool,
pub obstruct_ground: bool,
pub supports_items: Option<u8>,
pub actions: [String; 5],
pub interact_type: u8,
pub rotated: bool,
pub ambient_sound_id: u16,
pub blocks_projectile: bool,
pub wall_or_door: Option<u8>,
pub contoured_ground: Option<u8>,
pub config_change_dest: Vec<u16>,
pub params: HashMap<u32, String>,
pub model_data: ObjectModelData,
}
Expand description
Contains all the information about a certain object fetched from the cache through the ObjectLoader.
Fields
id: u16
name: String
config_id: Option<u16>
map_area_id: Option<u16>
map_scene_id: u16
animation_id: u16
solid: bool
shadow: bool
obstruct_ground: bool
supports_items: Option<u8>
actions: [String; 5]
interact_type: u8
rotated: bool
ambient_sound_id: u16
blocks_projectile: bool
wall_or_door: Option<u8>
contoured_ground: Option<u8>
config_change_dest: Vec<u16>
params: HashMap<u32, String>
model_data: ObjectModelData
Trait Implementations
Returns the “default value” for a type. Read more
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ObjectDefinition
impl Send for ObjectDefinition
impl Sync for ObjectDefinition
impl Unpin for ObjectDefinition
impl UnwindSafe for ObjectDefinition
Blanket Implementations
Mutably borrows from an owned value. Read more
fn fetch_from_index<D>(
cache: &Cache,
index_id: u8
) -> Result<HashMap<u16, D>, Error> where
D: Definition,
fn fetch_from_index<D>(
cache: &Cache,
index_id: u8
) -> Result<HashMap<u16, D>, Error> where
D: Definition,
Fetches multiple definitions from every archive in the index. Read more