Enum screeps::enums::TypedRoomObject

source ·
pub enum TypedRoomObject {
Show 36 variants ConstructionSite(ConstructionSite), Creep(Creep), Deposit(Deposit), Flag(Flag), Mineral(Mineral), Nuke(Nuke), PowerCreep(PowerCreep), Resource(Resource), Ruin(Ruin), ScoreCollector(ScoreCollector), ScoreContainer(ScoreContainer), Source(Source), StructureContainer(StructureContainer), StructureController(StructureController), StructureExtension(StructureExtension), StructureExtractor(StructureExtractor), StructureFactory(StructureFactory), StructureInvaderCore(StructureInvaderCore), StructureKeeperLair(StructureKeeperLair), StructureLab(StructureLab), StructureLink(StructureLink), StructureNuker(StructureNuker), StructureObserver(StructureObserver), StructurePortal(StructurePortal), StructurePowerBank(StructurePowerBank), StructurePowerSpawn(StructurePowerSpawn), StructureRampart(StructureRampart), StructureRoad(StructureRoad), StructureSpawn(StructureSpawn), StructureStorage(StructureStorage), StructureTerminal(StructureTerminal), StructureTower(StructureTower), StructureWall(StructureWall), SymbolContainer(SymbolContainer), SymbolDecoder(SymbolDecoder), Tombstone(Tombstone),
}
Expand description

Any enum representing any game object that inherits the RoomObject type.

Variants§

§

ConstructionSite(ConstructionSite)

§

Creep(Creep)

§

Deposit(Deposit)

§

Flag(Flag)

§

Mineral(Mineral)

§

Nuke(Nuke)

§

PowerCreep(PowerCreep)

§

Resource(Resource)

§

Ruin(Ruin)

§

ScoreCollector(ScoreCollector)

Available on crate feature seasonal-season-1 only.
§

ScoreContainer(ScoreContainer)

Available on crate feature seasonal-season-1 only.
§

Source(Source)

§

StructureContainer(StructureContainer)

§

StructureController(StructureController)

§

StructureExtension(StructureExtension)

§

StructureExtractor(StructureExtractor)

§

StructureFactory(StructureFactory)

§

StructureInvaderCore(StructureInvaderCore)

§

StructureKeeperLair(StructureKeeperLair)

§

StructureLab(StructureLab)

§

StructureNuker(StructureNuker)

§

StructureObserver(StructureObserver)

§

StructurePortal(StructurePortal)

§

StructurePowerBank(StructurePowerBank)

§

StructurePowerSpawn(StructurePowerSpawn)

§

StructureRampart(StructureRampart)

§

StructureRoad(StructureRoad)

§

StructureSpawn(StructureSpawn)

§

StructureStorage(StructureStorage)

§

StructureTerminal(StructureTerminal)

§

StructureTower(StructureTower)

§

StructureWall(StructureWall)

§

SymbolContainer(SymbolContainer)

Available on crate feature seasonal-season-2 only.
§

SymbolDecoder(SymbolDecoder)

Available on crate feature seasonal-season-2 only.
§

Tombstone(Tombstone)

Trait Implementations§

source§

impl From<ConstructionSite> for TypedRoomObject

source§

fn from(v: ConstructionSite) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Creep> for TypedRoomObject

source§

fn from(v: Creep) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Deposit> for TypedRoomObject

source§

fn from(v: Deposit) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Flag> for TypedRoomObject

source§

fn from(v: Flag) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Mineral> for TypedRoomObject

source§

fn from(v: Mineral) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Nuke> for TypedRoomObject

source§

fn from(v: Nuke) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<PowerCreep> for TypedRoomObject

source§

fn from(v: PowerCreep) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Resource> for TypedRoomObject

source§

fn from(v: Resource) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Ruin> for TypedRoomObject

source§

fn from(v: Ruin) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<ScoreCollector> for TypedRoomObject

Available on crate feature seasonal-season-1 only.
source§

fn from(v: ScoreCollector) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<ScoreContainer> for TypedRoomObject

Available on crate feature seasonal-season-1 only.
source§

fn from(v: ScoreContainer) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Source> for TypedRoomObject

source§

fn from(v: Source) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureContainer> for TypedRoomObject

source§

fn from(v: StructureContainer) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureController> for TypedRoomObject

source§

fn from(v: StructureController) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureExtension> for TypedRoomObject

source§

fn from(v: StructureExtension) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureExtractor> for TypedRoomObject

source§

fn from(v: StructureExtractor) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureFactory> for TypedRoomObject

source§

fn from(v: StructureFactory) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureInvaderCore> for TypedRoomObject

source§

fn from(v: StructureInvaderCore) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureKeeperLair> for TypedRoomObject

source§

fn from(v: StructureKeeperLair) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureLab> for TypedRoomObject

source§

fn from(v: StructureLab) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureLink> for TypedRoomObject

source§

fn from(v: StructureLink) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureNuker> for TypedRoomObject

source§

fn from(v: StructureNuker) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureObserver> for TypedRoomObject

source§

fn from(v: StructureObserver) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructurePortal> for TypedRoomObject

source§

fn from(v: StructurePortal) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructurePowerBank> for TypedRoomObject

source§

fn from(v: StructurePowerBank) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructurePowerSpawn> for TypedRoomObject

source§

fn from(v: StructurePowerSpawn) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureRampart> for TypedRoomObject

source§

fn from(v: StructureRampart) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureRoad> for TypedRoomObject

source§

fn from(v: StructureRoad) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureSpawn> for TypedRoomObject

source§

fn from(v: StructureSpawn) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureStorage> for TypedRoomObject

source§

fn from(v: StructureStorage) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureTerminal> for TypedRoomObject

source§

fn from(v: StructureTerminal) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureTower> for TypedRoomObject

source§

fn from(v: StructureTower) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<StructureWall> for TypedRoomObject

source§

fn from(v: StructureWall) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<SymbolContainer> for TypedRoomObject

Available on crate feature seasonal-season-2 only.
source§

fn from(v: SymbolContainer) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<SymbolDecoder> for TypedRoomObject

Available on crate feature seasonal-season-2 only.
source§

fn from(v: SymbolDecoder) -> TypedRoomObject

Converts to this type from the input type.
source§

impl From<Tombstone> for TypedRoomObject

source§

fn from(v: Tombstone) -> TypedRoomObject

Converts to this type from the input type.
source§

impl RoomObjectProperties for TypedRoomObject

source§

fn effects(&self) -> Vec<Effect>

Effects applied to the object.

Screeps documentation

source§

fn effects_raw(&self) -> Option<Array>

Effects applied to the object.

Screeps documentation

source§

fn room(&self) -> Option<Room>

A link to the room that the object is currently in, or None if the object is a power creep not spawned on the current shard, or a flag or construction site not in a visible room.

Screeps documentation

source§

impl TryInto<ConstructionSite> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ConstructionSite, <Self as TryInto<ConstructionSite>>::Error>

Performs the conversion.
source§

impl TryInto<Creep> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Creep, <Self as TryInto<Creep>>::Error>

Performs the conversion.
source§

impl TryInto<Deposit> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Deposit, <Self as TryInto<Deposit>>::Error>

Performs the conversion.
source§

impl TryInto<Flag> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Flag, <Self as TryInto<Flag>>::Error>

Performs the conversion.
source§

impl TryInto<Mineral> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Mineral, <Self as TryInto<Mineral>>::Error>

Performs the conversion.
source§

impl TryInto<Nuke> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Nuke, <Self as TryInto<Nuke>>::Error>

Performs the conversion.
source§

impl TryInto<PowerCreep> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<PowerCreep, <Self as TryInto<PowerCreep>>::Error>

Performs the conversion.
source§

impl TryInto<Resource> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Resource, <Self as TryInto<Resource>>::Error>

Performs the conversion.
source§

impl TryInto<Ruin> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Ruin, <Self as TryInto<Ruin>>::Error>

Performs the conversion.
source§

impl TryInto<ScoreCollector> for TypedRoomObject

Available on crate feature seasonal-season-1 only.
§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ScoreCollector, <Self as TryInto<ScoreCollector>>::Error>

Performs the conversion.
source§

impl TryInto<ScoreContainer> for TypedRoomObject

Available on crate feature seasonal-season-1 only.
§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<ScoreContainer, <Self as TryInto<ScoreContainer>>::Error>

Performs the conversion.
source§

impl TryInto<Source> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Source, <Self as TryInto<Source>>::Error>

Performs the conversion.
source§

impl TryInto<StructureContainer> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureContainer, <Self as TryInto<StructureContainer>>::Error>

Performs the conversion.
source§

impl TryInto<StructureController> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureController, <Self as TryInto<StructureController>>::Error>

Performs the conversion.
source§

impl TryInto<StructureExtension> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureExtension, <Self as TryInto<StructureExtension>>::Error>

Performs the conversion.
source§

impl TryInto<StructureExtractor> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureExtractor, <Self as TryInto<StructureExtractor>>::Error>

Performs the conversion.
source§

impl TryInto<StructureFactory> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureFactory, <Self as TryInto<StructureFactory>>::Error>

Performs the conversion.
source§

impl TryInto<StructureInvaderCore> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureInvaderCore, <Self as TryInto<StructureInvaderCore>>::Error>

Performs the conversion.
source§

impl TryInto<StructureKeeperLair> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureKeeperLair, <Self as TryInto<StructureKeeperLair>>::Error>

Performs the conversion.
source§

impl TryInto<StructureLab> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureLab, <Self as TryInto<StructureLab>>::Error>

Performs the conversion.
source§

impl TryInto<StructureLink> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureLink, <Self as TryInto<StructureLink>>::Error>

Performs the conversion.
source§

impl TryInto<StructureNuker> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureNuker, <Self as TryInto<StructureNuker>>::Error>

Performs the conversion.
source§

impl TryInto<StructureObserver> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureObserver, <Self as TryInto<StructureObserver>>::Error>

Performs the conversion.
source§

impl TryInto<StructurePortal> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructurePortal, <Self as TryInto<StructurePortal>>::Error>

Performs the conversion.
source§

impl TryInto<StructurePowerBank> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructurePowerBank, <Self as TryInto<StructurePowerBank>>::Error>

Performs the conversion.
source§

impl TryInto<StructurePowerSpawn> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructurePowerSpawn, <Self as TryInto<StructurePowerSpawn>>::Error>

Performs the conversion.
source§

impl TryInto<StructureRampart> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureRampart, <Self as TryInto<StructureRampart>>::Error>

Performs the conversion.
source§

impl TryInto<StructureRoad> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureRoad, <Self as TryInto<StructureRoad>>::Error>

Performs the conversion.
source§

impl TryInto<StructureSpawn> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureSpawn, <Self as TryInto<StructureSpawn>>::Error>

Performs the conversion.
source§

impl TryInto<StructureStorage> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureStorage, <Self as TryInto<StructureStorage>>::Error>

Performs the conversion.
source§

impl TryInto<StructureTerminal> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureTerminal, <Self as TryInto<StructureTerminal>>::Error>

Performs the conversion.
source§

impl TryInto<StructureTower> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureTower, <Self as TryInto<StructureTower>>::Error>

Performs the conversion.
source§

impl TryInto<StructureWall> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<StructureWall, <Self as TryInto<StructureWall>>::Error>

Performs the conversion.
source§

impl TryInto<SymbolContainer> for TypedRoomObject

Available on crate feature seasonal-season-2 only.
§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<SymbolContainer, <Self as TryInto<SymbolContainer>>::Error>

Performs the conversion.
source§

impl TryInto<SymbolDecoder> for TypedRoomObject

Available on crate feature seasonal-season-2 only.
§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into( self ) -> Result<SymbolDecoder, <Self as TryInto<SymbolDecoder>>::Error>

Performs the conversion.
source§

impl TryInto<Tombstone> for TypedRoomObject

§

type Error = &'static str

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<Tombstone, <Self as TryInto<Tombstone>>::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.