pub enum TransferableObject {
Show 13 variants StructureExtension(StructureExtension), Creep(Creep), StructureContainer(StructureContainer), StructureFactory(StructureFactory), StructureLab(StructureLab), StructureLink(StructureLink), StructureNuker(StructureNuker), StructureSpawn(StructureSpawn), StructureStorage(StructureStorage), StructureTower(StructureTower), StructurePowerSpawn(StructurePowerSpawn), StructureTerminal(StructureTerminal), PowerCreep(PowerCreep),
}

Variants§

§

StructureExtension(StructureExtension)

§

Creep(Creep)

§

StructureContainer(StructureContainer)

§

StructureFactory(StructureFactory)

§

StructureLab(StructureLab)

§

StructureNuker(StructureNuker)

§

StructureSpawn(StructureSpawn)

§

StructureStorage(StructureStorage)

§

StructureTower(StructureTower)

§

StructurePowerSpawn(StructurePowerSpawn)

§

StructureTerminal(StructureTerminal)

§

PowerCreep(PowerCreep)

Trait Implementations§

source§

impl AsRef<RoomObject> for TransferableObject

source§

fn as_ref(&self) -> &RoomObject

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl From<Creep> for TransferableObject

source§

fn from(v: Creep) -> TransferableObject

Converts to this type from the input type.
source§

impl From<PowerCreep> for TransferableObject

source§

fn from(v: PowerCreep) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureContainer> for TransferableObject

source§

fn from(v: StructureContainer) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureExtension> for TransferableObject

source§

fn from(v: StructureExtension) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureFactory> for TransferableObject

source§

fn from(v: StructureFactory) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureLab> for TransferableObject

source§

fn from(v: StructureLab) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureLink> for TransferableObject

source§

fn from(v: StructureLink) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureNuker> for TransferableObject

source§

fn from(v: StructureNuker) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructurePowerSpawn> for TransferableObject

source§

fn from(v: StructurePowerSpawn) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureSpawn> for TransferableObject

source§

fn from(v: StructureSpawn) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureStorage> for TransferableObject

source§

fn from(v: StructureStorage) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureTerminal> for TransferableObject

source§

fn from(v: StructureTerminal) -> TransferableObject

Converts to this type from the input type.
source§

impl From<StructureTower> for TransferableObject

source§

fn from(v: StructureTower) -> TransferableObject

Converts to this type from the input type.
source§

impl TryFrom<StructureObject> for TransferableObject

§

type Error = TransferableObjectConversionError

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

fn try_from(structure: StructureObject) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryInto<Creep> for TransferableObject

§

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<PowerCreep> for TransferableObject

§

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<StructureContainer> for TransferableObject

§

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<StructureExtension> for TransferableObject

§

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<StructureFactory> for TransferableObject

§

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<StructureLab> for TransferableObject

§

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 TransferableObject

§

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 TransferableObject

§

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<StructurePowerSpawn> for TransferableObject

§

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<StructureSpawn> for TransferableObject

§

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 TransferableObject

§

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 TransferableObject

§

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 TransferableObject

§

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 Transferable for TransferableObject

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> HasPosition for T
where T: AsRef<RoomObject>,

source§

fn pos(&self) -> Position

Position of the object.
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> RoomObjectProperties for T
where T: AsRef<RoomObject>,

source§

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

Effects applied to the object. Read more
source§

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

Effects applied to the object. Read more
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. Read more
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.