Struct screeps::local::LocalCostMatrix
source · pub struct LocalCostMatrix { /* private fields */ }
Implementations§
source§impl LocalCostMatrix
impl LocalCostMatrix
pub fn new() -> Self
pub fn set(&mut self, xy: RoomXY, val: u8)
pub fn get(&self, xy: RoomXY) -> u8
pub fn get_bits(&self) -> &[u8; 2500]
pub fn iter(&self) -> impl Iterator<Item = (RoomXY, u8)> + '_
pub fn iter_mut(&mut self) -> impl Iterator<Item = (RoomXY, &mut u8)>
pub fn merge_from_dense(&mut self, src: &LocalCostMatrix)
pub fn merge_from_sparse(&mut self, src: &SparseCostMatrix)
Trait Implementations§
source§impl Clone for LocalCostMatrix
impl Clone for LocalCostMatrix
source§fn clone(&self) -> LocalCostMatrix
fn clone(&self) -> LocalCostMatrix
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LocalCostMatrix
impl Debug for LocalCostMatrix
source§impl Default for LocalCostMatrix
impl Default for LocalCostMatrix
source§impl<'de> Deserialize<'de> for LocalCostMatrix
impl<'de> Deserialize<'de> for LocalCostMatrix
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&CostMatrix> for LocalCostMatrix
impl From<&CostMatrix> for LocalCostMatrix
source§fn from(js_matrix: &CostMatrix) -> Self
fn from(js_matrix: &CostMatrix) -> Self
Converts to this type from the input type.
source§impl From<&LocalCostMatrix> for SparseCostMatrix
impl From<&LocalCostMatrix> for SparseCostMatrix
source§fn from(lcm: &LocalCostMatrix) -> Self
fn from(lcm: &LocalCostMatrix) -> Self
Converts to this type from the input type.
source§impl From<&SparseCostMatrix> for LocalCostMatrix
impl From<&SparseCostMatrix> for LocalCostMatrix
source§fn from(scm: &SparseCostMatrix) -> Self
fn from(scm: &SparseCostMatrix) -> Self
Converts to this type from the input type.
source§impl From<LocalCostMatrix> for CostMatrix
impl From<LocalCostMatrix> for CostMatrix
source§fn from(matrix: LocalCostMatrix) -> Self
fn from(matrix: LocalCostMatrix) -> Self
Converts to this type from the input type.
source§impl From<SparseCostMatrix> for LocalCostMatrix
impl From<SparseCostMatrix> for LocalCostMatrix
source§fn from(scm: SparseCostMatrix) -> Self
fn from(scm: SparseCostMatrix) -> Self
Converts to this type from the input type.
source§impl Index<Position> for LocalCostMatrix
impl Index<Position> for LocalCostMatrix
source§impl Index<RoomXY> for LocalCostMatrix
impl Index<RoomXY> for LocalCostMatrix
source§impl IndexMut<Position> for LocalCostMatrix
impl IndexMut<Position> for LocalCostMatrix
source§impl IndexMut<RoomXY> for LocalCostMatrix
impl IndexMut<RoomXY> for LocalCostMatrix
source§impl PartialEq<LocalCostMatrix> for LocalCostMatrix
impl PartialEq<LocalCostMatrix> for LocalCostMatrix
source§fn eq(&self, other: &LocalCostMatrix) -> bool
fn eq(&self, other: &LocalCostMatrix) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LocalCostMatrix
impl Serialize for LocalCostMatrix
impl Eq for LocalCostMatrix
impl StructuralEq for LocalCostMatrix
impl StructuralPartialEq for LocalCostMatrix
Auto Trait Implementations§
impl RefUnwindSafe for LocalCostMatrix
impl Send for LocalCostMatrix
impl Sync for LocalCostMatrix
impl Unpin for LocalCostMatrix
impl UnwindSafe for LocalCostMatrix
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more