[][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 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
) -> 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 Clone for RoomPosition[src]

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

Performs copy-assignment from source. Read more

impl From<RoomPosition> for Reference[src]

impl Eq for RoomPosition[src]

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

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl AsRef<Reference> 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 InstanceOf for RoomPosition[src]

impl JsSerialize 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 for T where
    T: FromExpectedType<Reference>, 
[src]

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

impl<T> From for T[src]

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

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

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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.

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

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

The type returned in the event of a conversion error.