[][src]Trait screeps::objects::OwnedStructureProperties

pub unsafe trait OwnedStructureProperties: StructureProperties {
    fn my(&self) -> bool { ... }
fn has_owner(&self) -> bool { ... }
fn owner_name(&self) -> Option<String> { ... }
fn as_owned_structure(self) -> OwnedStructure
    where
        Self: SizedRoomObject
, { ... } }

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

Contracts

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

Provided methods

fn my(&self) -> bool

Whether this structure is owned by you (in JS: my || false)

fn has_owner(&self) -> bool

Whether this structure is currently owned by someone (in JS: my !== undefined)

fn owner_name(&self) -> Option<String>

The name of the owner of this structure, if any.

fn as_owned_structure(self) -> OwnedStructure where
    Self: SizedRoomObject

Anonymize this as an owned structure.

Loading content...

Implementors

impl OwnedStructureProperties for OwnedStructure[src]

impl OwnedStructureProperties for StructureController[src]

impl OwnedStructureProperties for StructureExtension[src]

impl OwnedStructureProperties for StructureExtractor[src]

impl OwnedStructureProperties for StructureFactory[src]

impl OwnedStructureProperties for StructureInvaderCore[src]

impl OwnedStructureProperties for StructureKeeperLair[src]

impl OwnedStructureProperties for StructureLab[src]

impl OwnedStructureProperties for StructureLink[src]

impl OwnedStructureProperties for StructureNuker[src]

impl OwnedStructureProperties for StructureObserver[src]

impl OwnedStructureProperties for StructurePowerBank[src]

impl OwnedStructureProperties for StructurePowerSpawn[src]

impl OwnedStructureProperties for StructureRampart[src]

impl OwnedStructureProperties for StructureSpawn[src]

impl OwnedStructureProperties for StructureStorage[src]

impl OwnedStructureProperties for StructureTerminal[src]

impl OwnedStructureProperties for StructureTower[src]

Loading content...