Trait screeps::constants::find::FindConstant

source ·
pub trait FindConstant {
    type Item: From<JsValue>;

    // Required methods
    fn convert_and_check_item(reference: JsValue) -> Self::Item;
    fn find_code(&self) -> Find;
}
Expand description

Trait representing things which can be used in the ‘find’ function.

Typically used with zero-sized structs in the find module.

Required Associated Types§

Required Methods§

source

fn convert_and_check_item(reference: JsValue) -> Self::Item

source

fn find_code(&self) -> Find

Object Safety§

This trait is not object safe.

Implementors§

source§

impl FindConstant for Exit

source§

impl FindConstant for RoomObject

source§

impl FindConstant for CONSTRUCTION_SITES

source§

impl FindConstant for CREEPS

§

type Item = Creep

source§

impl FindConstant for DEPOSITS

source§

impl FindConstant for DROPPED_RESOURCES

source§

impl FindConstant for EXIT

source§

impl FindConstant for EXIT_BOTTOM

source§

impl FindConstant for EXIT_LEFT

source§

impl FindConstant for EXIT_RIGHT

source§

impl FindConstant for EXIT_TOP

source§

impl FindConstant for FLAGS

§

type Item = Flag

source§

impl FindConstant for HOSTILE_CONSTRUCTION_SITES

source§

impl FindConstant for HOSTILE_CREEPS

§

type Item = Creep

source§

impl FindConstant for HOSTILE_POWER_CREEPS

source§

impl FindConstant for HOSTILE_SPAWNS

source§

impl FindConstant for HOSTILE_STRUCTURES

source§

impl FindConstant for MINERALS

source§

impl FindConstant for MY_CONSTRUCTION_SITES

source§

impl FindConstant for MY_CREEPS

§

type Item = Creep

source§

impl FindConstant for MY_POWER_CREEPS

source§

impl FindConstant for MY_SPAWNS

source§

impl FindConstant for MY_STRUCTURES

source§

impl FindConstant for NUKES

§

type Item = Nuke

source§

impl FindConstant for POWER_CREEPS

source§

impl FindConstant for REACTORS

source§

impl FindConstant for RUINS

§

type Item = Ruin

source§

impl FindConstant for SCORE_COLLECTORS

source§

impl FindConstant for SCORE_CONTAINERS

source§

impl FindConstant for SOURCES

§

type Item = Source

source§

impl FindConstant for SOURCES_ACTIVE

§

type Item = Source

source§

impl FindConstant for STRUCTURES

source§

impl FindConstant for SYMBOL_CONTAINERS

source§

impl FindConstant for SYMBOL_DECODERS

source§

impl FindConstant for TOMBSTONES