[−][src]Trait screeps::objects::OwnedStructureProperties
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,
Self: SizedRoomObject,
Anonymize this as an owned structure.