[][src]Trait screeps::objects::StructureProperties

pub unsafe trait StructureProperties: RoomObjectProperties + HasId {
    fn structure_type(&self) -> StructureType { ... }
fn destroy(&self) -> ReturnCode { ... }
fn is_active(&self) -> bool { ... }
fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode { ... }
fn as_structure(self) -> Structure
    where
        Self: SizedRoomObject
, { ... } }

Trait for all wrappers over Screeps JavaScript objects extending the Structure class.

Contracts

The reference returned by AsRef<Reference>::as_ref must reference a JavaScript object extending the Structure class.

Provided methods

fn structure_type(&self) -> StructureType

fn destroy(&self) -> ReturnCode

fn is_active(&self) -> bool

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode

Usable on either owned structures or neutral structures in owned rooms, returns ReturnCode::NotOwner otherwise.

fn as_structure(self) -> Structure where
    Self: SizedRoomObject

Loading content...

Implementors

impl StructureProperties for Structure[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for OwnedStructure[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureContainer[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureController[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureExtension[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureExtractor[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureKeeperLair[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureLab[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureLink[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureNuker[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureObserver[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructurePortal[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructurePowerBank[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructurePowerSpawn[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureRampart[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureRoad[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureSpawn[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureStorage[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureTerminal[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureTower[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

impl StructureProperties for StructureWall[src]

fn structure_type(&self) -> StructureType[src]

fn destroy(&self) -> ReturnCode[src]

fn is_active(&self) -> bool[src]

fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode[src]

fn as_structure(self) -> Structure where
    Self: SizedRoomObject
[src]

Loading content...