Struct screeps::objects::StructureLab
source · pub struct StructureLab(_);
Implementations
sourceimpl StructureLab
impl StructureLab
pub fn mineral_amount(&self) -> u32
pub fn mineral_capacity(&self) -> u32
sourceimpl StructureLab
impl StructureLab
pub fn mineral_type(&self) -> ResourceType
pub fn boost_creep(
&self,
creep: &Creep,
body_part_count: Option<u32>
) -> ReturnCode
pub fn run_reaction(&self, lab1: &StructureLab, lab2: &StructureLab) -> ReturnCode
pub fn unboost_creep(&self, creep: &Creep) -> ReturnCode
Trait Implementations
sourceimpl AsRef<Reference> for StructureLab
impl AsRef<Reference> for StructureLab
sourceimpl Attackable for StructureLab
impl Attackable for StructureLab
sourceimpl CanStoreEnergy for StructureLab
impl CanStoreEnergy for StructureLab
sourceimpl Clone for StructureLab
impl Clone for StructureLab
sourcefn clone(&self) -> StructureLab
fn clone(&self) -> StructureLab
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 moresourceimpl From<StructureLab> for Reference
impl From<StructureLab> for Reference
sourcefn from(value: StructureLab) -> Self
fn from(value: StructureLab) -> Self
Converts to this type from the input type.
sourceimpl FromExpectedType<Reference> for StructureLab
impl FromExpectedType<Reference> for StructureLab
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl HasCooldown for StructureLab
impl HasCooldown for StructureLab
sourceimpl InstanceOf for StructureLab
impl InstanceOf for StructureLab
sourcefn instance_of(reference: &Reference) -> bool
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type
Self
.sourceimpl OwnedStructureProperties for StructureLab
impl OwnedStructureProperties for StructureLab
fn my(&self) -> bool
fn owner_name(&self) -> Option<String>
fn as_owned_structure(self) -> OwnedStructure
sourceimpl PartialEq<StructureLab> for StructureLab
impl PartialEq<StructureLab> for StructureLab
sourcefn eq(&self, other: &StructureLab) -> bool
fn eq(&self, other: &StructureLab) -> bool
sourceimpl ReferenceType for StructureLab
impl ReferenceType for StructureLab
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 RoomObjectProperties for StructureLab
impl RoomObjectProperties for StructureLab
sourceimpl StructureProperties for StructureLab
impl StructureProperties for StructureLab
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
sourceimpl<'_r> TryFrom<&'_r Reference> for StructureLab
impl<'_r> TryFrom<&'_r Reference> for StructureLab
sourceimpl<'_r> TryFrom<&'_r Value> for StructureLab
impl<'_r> TryFrom<&'_r Value> for StructureLab
sourceimpl TryFrom<Reference> for StructureLab
impl TryFrom<Reference> for StructureLab
sourceimpl TryFrom<StructureLab> for Reference
impl TryFrom<StructureLab> for Reference
sourceimpl TryFrom<Value> for StructureLab
impl TryFrom<Value> for StructureLab
impl Eq for StructureLab
impl JsSerialize for StructureLab
impl Transferable for StructureLab
impl Withdrawable for StructureLab
Auto Trait Implementations
impl RefUnwindSafe for StructureLab
impl Send for StructureLab
impl Sync for StructureLab
impl Unpin for StructureLab
impl UnwindSafe for StructureLab
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