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