Struct screeps::objects::StructureController
source · pub struct StructureController(_);
Implementations
sourceimpl StructureController
impl StructureController
pub fn level(&self) -> u32
pub fn progress(&self) -> u32
pub fn progress_total(&self) -> u32
pub fn safe_mode(&self) -> u32
pub fn safe_mode_available(&self) -> u32
pub fn safe_mode_cooldown(&self) -> u32
pub fn ticks_to_downgrade(&self) -> u32
pub fn upgrade_blocked(&self) -> u32
sourceimpl StructureController
impl StructureController
pub fn activate_safe_mode(&self) -> ReturnCode
pub fn reservation(&self) -> Option<Reservation>
pub fn sign(&self) -> Option<Sign>
pub fn unclaim(&self) -> ReturnCode
Trait Implementations
sourceimpl AsRef<Reference> for StructureController
impl AsRef<Reference> for StructureController
sourceimpl Clone for StructureController
impl Clone for StructureController
sourcefn clone(&self) -> StructureController
fn clone(&self) -> StructureController
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<StructureController> for Reference
impl From<StructureController> for Reference
sourcefn from(value: StructureController) -> Self
fn from(value: StructureController) -> Self
Converts to this type from the input type.
sourceimpl FromExpectedType<Reference> for StructureController
impl FromExpectedType<Reference> for StructureController
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>
sourceimpl InstanceOf for StructureController
impl InstanceOf for StructureController
sourcefn instance_of(reference: &Reference) -> bool
fn instance_of(reference: &Reference) -> bool
Checks whenever a given Reference if of type
Self
.sourceimpl OwnedStructureProperties for StructureController
impl OwnedStructureProperties for StructureController
fn my(&self) -> bool
fn owner_name(&self) -> Option<String>
fn as_owned_structure(self) -> OwnedStructure
sourceimpl PartialEq<StructureController> for StructureController
impl PartialEq<StructureController> for StructureController
sourcefn eq(&self, other: &StructureController) -> bool
fn eq(&self, other: &StructureController) -> bool
sourceimpl ReferenceType for StructureController
impl ReferenceType for StructureController
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 StructureController
impl StructureProperties for StructureController
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 StructureController
impl<'_r> TryFrom<&'_r Reference> for StructureController
sourceimpl<'_r> TryFrom<&'_r Value> for StructureController
impl<'_r> TryFrom<&'_r Value> for StructureController
sourceimpl TryFrom<Reference> for StructureController
impl TryFrom<Reference> for StructureController
sourceimpl TryFrom<StructureController> for Reference
impl TryFrom<StructureController> for Reference
sourceimpl TryFrom<Value> for StructureController
impl TryFrom<Value> for StructureController
impl Eq for StructureController
impl JsSerialize for StructureController
Auto Trait Implementations
impl RefUnwindSafe for StructureController
impl Send for StructureController
impl Sync for StructureController
impl Unpin for StructureController
impl UnwindSafe for StructureController
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