[][src]Struct screeps::objects::RoomPosition

pub struct 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 coords(&self) -> (u32, u32)[src]

pub fn coords_signed(&self) -> (i32, i32)[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]

pub fn create_flag(
    &self,
    name: &str,
    main_color: Color,
    secondary_color: Color
) -> Result<String, ReturnCode>
[src]

pub fn find_closest_by_range<T>(&self, ty: T) -> Option<T::Item> where
    T: FindConstant
[src]

pub fn find_in_range<T>(&self, ty: T, range: u32) -> Vec<T::Item> where
    T: FindConstant
[src]

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]

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]

pub fn get_direction_to<T>(&self, target: &T) -> Direction where
    T: HasPosition
[src]

pub fn get_range_to<T>(&self, target: &T) -> u32 where
    T: HasPosition
[src]

pub fn in_range_to<T: ?Sized>(&self, target: &T, range: u32) -> bool where
    T: HasPosition
[src]

pub fn is_equal_to<T: ?Sized>(&self, target: &T) -> bool where
    T: HasPosition
[src]

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]

pub fn look(&self) -> Vec<LookResult>[src]

pub fn look_for<T>(&self, ty: T) -> Vec<T::Item> where
    T: LookConstant
[src]

Trait Implementations

impl HasPosition for RoomPosition[src]

impl FromExpectedType<Reference> for RoomPosition[src]

impl From<RoomPosition> for Reference[src]

impl<T: HasPosition> PartialEq<T> for RoomPosition[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Clone for RoomPosition[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl AsRef<Reference> for RoomPosition[src]

impl Eq for RoomPosition[src]

impl Into<(u8, u8)> for RoomPosition[src]

impl Into<(u16, u16)> for RoomPosition[src]

impl Into<(u32, u32)> for RoomPosition[src]

impl Into<(u64, u64)> for RoomPosition[src]

impl Into<(i8, i8)> for RoomPosition[src]

impl Into<(i16, i16)> for RoomPosition[src]

impl Into<(i32, i32)> for RoomPosition[src]

impl Into<(i64, i64)> for RoomPosition[src]

impl TryFrom<RoomPosition> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for RoomPosition[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for RoomPosition[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for RoomPosition[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for RoomPosition[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl JsSerialize for RoomPosition[src]

impl InstanceOf for RoomPosition[src]

impl ReferenceType for RoomPosition[src]

impl JsSerializeOwned for RoomPosition[src]

impl<'_r> JsSerializeOwned for &'_r RoomPosition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> HasPosition for T where
    T: RoomObjectProperties
[src]

impl<T> FromExpectedType<Value> for T where
    T: FromExpectedType<Reference>, 
[src]

impl<T, U> IntoExpectedType<U> for T where
    U: FromExpectedType<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.