Struct screeps::objects::RoomPosition
[−]
[src]
pub struct RoomPosition(_);
Methods
impl RoomPosition
[src]
pub fn new(x: u8, y: u8, room_name: &str) -> Self
[src]
pub fn x(&self) -> u8
[src]
pub fn y(&self) -> u8
[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_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) -> Vec<T::Item> where
T: FindConstant,
[src]
T: FindConstant,
pub fn find_in_range<T>(&self, ty: T, range: i32) -> Vec<T::Item> where
T: FindConstant,
[src]
T: FindConstant,
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) -> i32 where
T: HasPosition,
[src]
T: HasPosition,
pub fn in_range_to<T>(&self, target: &T, range: i32) -> bool where
T: HasPosition,
[src]
T: HasPosition,
pub fn is_equal_to<T>(&self, target: &T) -> bool where
T: HasPosition,
[src]
T: HasPosition,
pub fn is_near_to<T>(&self, target: &T) -> bool where
T: HasPosition,
[src]
T: HasPosition,
pub fn look_for<T>(&self, ty: T) -> Vec<T::Item> where
T: LookConstant,
[src]
T: LookConstant,
Trait Implementations
impl<T: HasPosition> PartialEq<T> for RoomPosition
[src]
fn eq(&self, other: &T) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for RoomPosition
[src]
impl Clone for RoomPosition
[src]
fn clone(&self) -> RoomPosition
[src]
Returns a copy of the value. Read more
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 From<RoomPosition> for Reference
[src]
fn from(wrapper: RoomPosition) -> Reference
[src]
Performs the conversion.
impl TryFrom<Value> for RoomPosition
[src]
type Error = <Value as TryInto<Reference>>::Error
The type returned in the event of a conversion error.
fn try_from(v: Value) -> Result<RoomPosition, Self::Error>
[src]
Performs the conversion.