Enum screeps::constants::find::RoomObject
source · #[repr(i16)]pub enum RoomObject {
Show 28 variants
Creeps = 101,
MyCreeps = 102,
HostileCreeps = 103,
SourcesActive = 104,
Sources = 105,
DroppedResources = 106,
Structures = 107,
MyStructures = 108,
HostileStructures = 109,
Flags = 110,
ConstructionSites = 111,
MySpawns = 112,
HostileSpawns = 113,
MyConstructionSites = 114,
HostileConstructionSites = 115,
Minerals = 116,
Nukes = 117,
Tombstones = 118,
PowerCreeps = 119,
MyPowerCreeps = 120,
HostilePowerCreeps = 121,
Deposits = 122,
Ruins = 123,
ScoreContainers = 10_011,
ScoreCollectors = 10_012,
SymbolContainers = 10_021,
SymbolDecoders = 10_022,
Reactors = 10_051,
}
Expand description
Useful for finding any RoomObject
with
a dynamically-chosen find constant.
If you know ahead of time what constant you’ll use, then the all-upper-case constants in this module will be more helpful, and won’t require casting the result types.
Note: To avoid ambiguity with RoomObject
, you should refer to this
enum as find::RoomObject
rather than importing it directly.
Variants§
Creeps = 101
MyCreeps = 102
HostileCreeps = 103
SourcesActive = 104
Sources = 105
DroppedResources = 106
Structures = 107
MyStructures = 108
HostileStructures = 109
Flags = 110
ConstructionSites = 111
MySpawns = 112
HostileSpawns = 113
MyConstructionSites = 114
HostileConstructionSites = 115
Minerals = 116
Nukes = 117
Tombstones = 118
PowerCreeps = 119
MyPowerCreeps = 120
HostilePowerCreeps = 121
Deposits = 122
Ruins = 123
ScoreContainers = 10_011
Available on crate feature
seasonal-season-1
only.ScoreCollectors = 10_012
Available on crate feature
seasonal-season-1
only.SymbolContainers = 10_021
Available on crate feature
seasonal-season-2
only.SymbolDecoders = 10_022
Available on crate feature
seasonal-season-2
only.Reactors = 10_051
Available on crate feature
seasonal-season-5
only.Trait Implementations§
source§impl Clone for RoomObject
impl Clone for RoomObject
source§fn clone(&self) -> RoomObject
fn clone(&self) -> RoomObject
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for RoomObject
impl Debug for RoomObject
source§impl FindConstant for RoomObject
impl FindConstant for RoomObject
source§impl Hash for RoomObject
impl Hash for RoomObject
source§impl PartialEq for RoomObject
impl PartialEq for RoomObject
source§fn eq(&self, other: &RoomObject) -> bool
fn eq(&self, other: &RoomObject) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for RoomObject
impl Eq for RoomObject
impl StructuralPartialEq for RoomObject
Auto Trait Implementations§
impl Freeze for RoomObject
impl RefUnwindSafe for RoomObject
impl Send for RoomObject
impl Sync for RoomObject
impl Unpin for RoomObject
impl UnwindSafe for RoomObject
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more