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 { ... }
}
Expand description

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

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

Implementors