[−][src]Struct screeps::objects::RoomPosition
Methods
impl RoomPosition[src]
pub fn new(x: u32, y: u32, room_name: &str) -> Self[src]
pub fn x(&self) -> u32[src]
pub fn y(&self) -> u32[src]
pub fn room_name(&self) -> String[src]
pub fn local(&self) -> LocalRoomPosition[src]
pub fn create_construction_site(&self, ty: StructureType) -> ReturnCode[src]
pub fn create_named_construction_site(
&self,
ty: StructureType,
name: &str
) -> ReturnCode[src]
&self,
ty: StructureType,
name: &str
) -> ReturnCode
pub fn create_flag(
&self,
name: &str,
main_color: Color,
secondary_color: Color
) -> ReturnCode[src]
&self,
name: &str,
main_color: Color,
secondary_color: Color
) -> ReturnCode
pub fn find_closest_by_range<T>(&self, ty: T) -> Option<T::Item> where
T: FindConstant, [src]
T: FindConstant,
pub fn find_in_range<T>(&self, ty: T, range: u32) -> Vec<T::Item> where
T: FindConstant, [src]
T: FindConstant,
pub fn find_path_to<'a, F, T: ?Sized>(
&self,
target: &T,
opts: FindOptions<'a, F>
) -> Path where
F: Fn(String, CostMatrix) -> Option<CostMatrix<'a>> + 'a,
T: HasPosition, [src]
&self,
target: &T,
opts: FindOptions<'a, F>
) -> Path where
F: Fn(String, CostMatrix) -> Option<CostMatrix<'a>> + 'a,
T: HasPosition,
pub fn find_path_to_xy<'a, F>(
&self,
x: u32,
y: u32,
opts: FindOptions<'a, F>
) -> Path where
F: Fn(String, CostMatrix) -> Option<CostMatrix<'a>> + 'a, [src]
&self,
x: u32,
y: u32,
opts: FindOptions<'a, F>
) -> Path where
F: Fn(String, CostMatrix) -> Option<CostMatrix<'a>> + 'a,
pub fn get_direction_to<T>(&self, target: &T) -> Direction where
T: HasPosition, [src]
T: HasPosition,
pub fn get_range_to<T>(&self, target: &T) -> u32 where
T: HasPosition, [src]
T: HasPosition,
pub fn in_range_to<T: ?Sized>(&self, target: &T, range: u32) -> bool where
T: HasPosition, [src]
T: HasPosition,
pub fn is_equal_to<T: ?Sized>(&self, target: &T) -> bool where
T: HasPosition, [src]
T: HasPosition,
pub fn is_equal_to_xy(&self, x: u32, y: u32) -> bool[src]
pub fn is_near_to<T: ?Sized>(&self, target: &T) -> bool where
T: HasPosition, [src]
T: HasPosition,
pub fn look(&self) -> Vec<LookResult>[src]
pub fn look_for<T>(&self, ty: T) -> Vec<T::Item> where
T: LookConstant, [src]
T: LookConstant,
Trait Implementations
impl HasPosition for RoomPosition[src]
fn pos(&self) -> RoomPosition[src]
impl FromExpectedType<Reference> for RoomPosition[src]
fn from_expected_type(reference: Reference) -> Result<Self, ConversionError>[src]
impl From<RoomPosition> for Reference[src]
fn from(value: RoomPosition) -> Self[src]
impl Eq for RoomPosition[src]
impl AsRef<Reference> for RoomPosition[src]
impl Clone for RoomPosition[src]
fn clone(&self) -> RoomPosition[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl<T: HasPosition> PartialEq<T> for RoomPosition[src]
fn eq(&self, other: &T) -> bool[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl TryFrom<RoomPosition> for Reference[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: RoomPosition) -> Result<Self, Self::Error>[src]
impl TryFrom<Reference> for RoomPosition[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>[src]
impl<'_r> TryFrom<&'_r Reference> for RoomPosition[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>[src]
impl TryFrom<Value> for RoomPosition[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>[src]
impl<'_r> TryFrom<&'_r Value> for RoomPosition[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>[src]
impl InstanceOf for RoomPosition[src]
fn instance_of(reference: &Reference) -> bool[src]
impl JsSerialize for RoomPosition[src]
impl ReferenceType for RoomPosition[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self[src]
impl JsSerializeOwned for RoomPosition[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>[src]
impl<'_r> JsSerializeOwned for &'_r RoomPosition[src]
fn into_js_owned<'_a>(value: &'_a mut Option<Self>) -> SerializedValue<'_a>[src]
Auto Trait Implementations
impl Send for RoomPosition
impl Sync for RoomPosition
Blanket Implementations
impl<T> HasPosition for T where
T: RoomObjectProperties, [src]
T: RoomObjectProperties,
fn pos(&Self) -> RoomPosition[src]
impl<T> FromExpectedType for T where
T: FromExpectedType<Reference>, [src]
T: FromExpectedType<Reference>,
fn from_expected_type(Value) -> Result<T, ConversionError>[src]
impl<T, U> IntoExpectedType for T where
U: FromExpectedType<T>, [src]
U: FromExpectedType<T>,
fn into_expected_type(Self) -> Result<U, ConversionError>[src]
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,