Struct screeps::objects::RoomPosition
[−]
[src]
pub struct RoomPosition(_);
Methods
impl RoomPosition
[src]
fn new(x: u8, y: u8, room_name: &str) -> Self
[src]
fn x(&self) -> u8
[src]
fn y(&self) -> u8
[src]
fn room_name(&self) -> String
[src]
fn create_construction_site(&self, ty: StructureType) -> ReturnCode
[src]
fn create_flag(
&self,
name: &str,
main_color: Color,
secondary_color: Color
) -> ReturnCode
[src]
&self,
name: &str,
main_color: Color,
secondary_color: Color
) -> ReturnCode
fn find_closest_by_range<T>(&self, ty: T) -> Vec<T::Item> where
T: FindConstant,
[src]
T: FindConstant,
fn find_in_range<T>(&self, ty: T, range: i32) -> Vec<T::Item> where
T: FindConstant,
[src]
T: FindConstant,
fn get_direction_to<T>(&self, target: &T) -> Direction where
T: HasPosition,
[src]
T: HasPosition,
fn get_range_to<T>(&self, target: &T) -> i32 where
T: HasPosition,
[src]
T: HasPosition,
fn in_range_to<T>(&self, target: &T, range: i32) -> bool where
T: HasPosition,
[src]
T: HasPosition,
fn is_equal_to<T>(&self, target: &T) -> bool where
T: HasPosition,
[src]
T: HasPosition,
fn is_near_to<T>(&self, target: &T) -> bool where
T: HasPosition,
[src]
T: HasPosition,
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 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.