Struct screeps::objects::StructurePowerSpawn
source · [−]pub struct StructurePowerSpawn(_);
Implementations
sourceimpl StructurePowerSpawn
impl StructurePowerSpawn
pub fn process_power(&self) -> ReturnCode
Trait Implementations
sourceimpl AsRef<Reference> for StructurePowerSpawn
impl AsRef<Reference> for StructurePowerSpawn
sourceimpl Attackable for StructurePowerSpawn
impl Attackable for StructurePowerSpawn
sourceimpl Clone for StructurePowerSpawn
impl Clone for StructurePowerSpawn
sourcefn clone(&self) -> StructurePowerSpawn
fn clone(&self) -> StructurePowerSpawn
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl From<StructurePowerSpawn> for Reference
impl From<StructurePowerSpawn> for Reference
sourcefn from(value: StructurePowerSpawn) -> Self
fn from(value: StructurePowerSpawn) -> Self
Converts to this type from the input type.
sourceimpl FromExpectedType<Reference> for StructurePowerSpawn
impl FromExpectedType<Reference> for StructurePowerSpawn
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl HasId for StructurePowerSpawn
impl HasId for StructurePowerSpawn
sourcefn untyped_id(&self) -> RawObjectId
fn untyped_id(&self) -> RawObjectId
Retrieves this object’s id as an untyped, packed value. Read more
sourceimpl HasStore for StructurePowerSpawn
impl HasStore for StructurePowerSpawn
fn store_total(&self) -> u32
fn store_types(&self) -> Vec<ResourceType>
fn store_of(&self, ty: ResourceType) -> u32
fn energy(&self) -> u32
fn store_capacity(&self, resource: Option<ResourceType>) -> u32
fn store_free_capacity(&self, resource: Option<ResourceType>) -> i32
fn store_used_capacity(&self, resource: Option<ResourceType>) -> u32
sourceimpl InstanceOf for StructurePowerSpawn
impl InstanceOf for StructurePowerSpawn
sourcefn instance_of(reference: &Reference) -> bool
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type Self
.
sourceimpl OwnedStructureProperties for StructurePowerSpawn
impl OwnedStructureProperties for StructurePowerSpawn
sourcefn has_owner(&self) -> bool
fn has_owner(&self) -> bool
Whether this structure is currently owned by someone (in JS: owner !== undefined
) Read more
sourcefn owner_name(&self) -> Option<String>
fn owner_name(&self) -> Option<String>
The name of the owner of this structure, if any.
sourcefn as_owned_structure(self) -> OwnedStructurewhere
Self: SizedRoomObject,
fn as_owned_structure(self) -> OwnedStructurewhere
Self: SizedRoomObject,
Anonymize this as an owned structure.
sourceimpl PartialEq<StructurePowerSpawn> for StructurePowerSpawn
impl PartialEq<StructurePowerSpawn> for StructurePowerSpawn
sourcefn eq(&self, other: &StructurePowerSpawn) -> bool
fn eq(&self, other: &StructurePowerSpawn) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl ReferenceType for StructurePowerSpawn
impl ReferenceType for StructurePowerSpawn
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 StructurePowerSpawn
impl StructureProperties for StructurePowerSpawn
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 more
fn as_structure(self) -> Structurewhere
Self: SizedRoomObject,
sourceimpl<'_r> TryFrom<&'_r Reference> for StructurePowerSpawn
impl<'_r> TryFrom<&'_r Reference> for StructurePowerSpawn
sourceimpl<'_r> TryFrom<&'_r Value> for StructurePowerSpawn
impl<'_r> TryFrom<&'_r Value> for StructurePowerSpawn
sourceimpl TryFrom<Reference> for StructurePowerSpawn
impl TryFrom<Reference> for StructurePowerSpawn
sourceimpl TryFrom<StructurePowerSpawn> for Reference
impl TryFrom<StructurePowerSpawn> for Reference
sourceimpl TryFrom<Value> for StructurePowerSpawn
impl TryFrom<Value> for StructurePowerSpawn
impl Eq for StructurePowerSpawn
impl JsSerialize for StructurePowerSpawn
impl Transferable for StructurePowerSpawn
impl Withdrawable for StructurePowerSpawn
Auto Trait Implementations
impl RefUnwindSafe for StructurePowerSpawn
impl Send for StructurePowerSpawn
impl Sync for StructurePowerSpawn
impl Unpin for StructurePowerSpawn
impl UnwindSafe for StructurePowerSpawn
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,
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