pub enum Structure {
Show 19 variants
Container(StructureContainer),
Controller(StructureController),
Extension(StructureExtension),
Extractor(StructureExtractor),
KeeperLair(StructureKeeperLair),
Lab(StructureLab),
Link(StructureLink),
Nuker(StructureNuker),
Observer(StructureObserver),
PowerBank(StructurePowerBank),
PowerSpawn(StructurePowerSpawn),
Portal(StructurePortal),
Rampart(StructureRampart),
Road(StructureRoad),
Spawn(StructureSpawn),
Storage(StructureStorage),
Terminal(StructureTerminal),
Tower(StructureTower),
Wall(StructureWall),
}
Variants
Container(StructureContainer)
Controller(StructureController)
Extension(StructureExtension)
Extractor(StructureExtractor)
KeeperLair(StructureKeeperLair)
Lab(StructureLab)
Link(StructureLink)
Nuker(StructureNuker)
Observer(StructureObserver)
PowerBank(StructurePowerBank)
PowerSpawn(StructurePowerSpawn)
Portal(StructurePortal)
Rampart(StructureRampart)
Road(StructureRoad)
Spawn(StructureSpawn)
Storage(StructureStorage)
Terminal(StructureTerminal)
Tower(StructureTower)
Wall(StructureWall)
Trait Implementations
sourceimpl FromExpectedType<Reference> for Structure
impl FromExpectedType<Reference> for Structure
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl InstanceOf for Structure
impl InstanceOf for Structure
sourcefn instance_of(reference: &Reference) -> bool
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type
Self
.sourceimpl ReferenceType for Structure
impl ReferenceType for Structure
sourceunsafe fn from_reference_unchecked(reference: Reference) -> Self
unsafe fn from_reference_unchecked(reference: Reference) -> Self
Converts a given reference into a concrete reference-like wrapper.
Doesn’t do any type checking; highly unsafe to use! Read more
sourceimpl StructureProperties for Structure
impl StructureProperties for Structure
fn structure_type(&self) -> StructureType
fn destroy(&self) -> ReturnCode
fn is_active(&self) -> bool
sourcefn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode
fn notify_when_attacked(&self, notify_when_attacked: bool) -> ReturnCode
Usable on either owned structures or neutral structures in owned rooms,
returns
ReturnCode::NotOwner
otherwise. Read morefn as_structure(self) -> Structure
impl Eq for Structure
Auto Trait Implementations
impl RefUnwindSafe for Structure
impl Send for Structure
impl Sync for Structure
impl Unpin for Structure
impl UnwindSafe for Structure
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromExpectedType<Value> for Twhere
T: FromExpectedType<Reference>,
impl<T> FromExpectedType<Value> for Twhere
T: FromExpectedType<Reference>,
fn from_expected_type(v: Value) -> Result<T, ConversionError>
sourceimpl<T> HasPosition for Twhere
T: RoomObjectProperties,
impl<T> HasPosition for Twhere
T: RoomObjectProperties,
fn pos(&self) -> RoomPosition
sourceimpl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
impl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
sourcefn into_expected_type(self) -> Result<U, ConversionError>
fn into_expected_type(self) -> Result<U, ConversionError>
Casts this value as the target type, making the assumption that the types are correct. Read more