[][src]Trait screeps::objects::HasStore

pub unsafe trait HasStore: RoomObjectProperties {
    fn store_total(&self) -> u32 { ... }
fn store_types(&self) -> Vec<ResourceType> { ... }
fn store_of(&self, ty: ResourceType) -> u32 { ... }
fn energy(&self) -> u32 { ... }
fn store_capacity(&self, resource: Option<ResourceType>) -> u32 { ... }
fn store_free_capacity(&self, resource: Option<ResourceType>) -> i32 { ... }
fn store_used_capacity(&self, resource: Option<ResourceType>) -> u32 { ... } }

Trait for all wrappers over Screeps JavaScript objects with a store property.

Contracts

The JavaScript object referenced by the return of AsRef<Reference>::as_ref must have a store property.

The store property must be a dict from string resource types to integers, and have the getCapacity, getFreeCapacity, and getUsedCapacity functions

Provided methods

fn store_total(&self) -> u32

fn store_types(&self) -> Vec<ResourceType>

fn store_of(&self, ty: ResourceType) -> u32

fn energy(&self) -> u32

fn store_capacity(&self, resource: Option<ResourceType>) -> u32

fn store_free_capacity(&self, resource: Option<ResourceType>) -> i32

fn store_used_capacity(&self, resource: Option<ResourceType>) -> u32

Loading content...

Implementors

impl HasStore for Creep[src]

impl HasStore for PowerCreep[src]

impl HasStore for Ruin[src]

impl HasStore for StructureContainer[src]

impl HasStore for StructureExtension[src]

impl HasStore for StructureFactory[src]

impl HasStore for StructureLab[src]

impl HasStore for StructureLink[src]

impl HasStore for StructureNuker[src]

impl HasStore for StructurePowerSpawn[src]

impl HasStore for StructureSpawn[src]

impl HasStore for StructureStorage[src]

impl HasStore for StructureTerminal[src]

impl HasStore for StructureTower[src]

impl HasStore for Tombstone[src]

Loading content...