Struct screeps::pathfinder::CostMatrix
source · [−]pub struct CostMatrix<'a> { /* private fields */ }
Expand description
A CostMatrix
that’s valid to pass as a result from a PathFinder.search
room callback.
Lives as long as 'a
lifetime. It’s unsound to leak to JS past this
lifetime if this matrix was created by LocalCostMatrix::as_uploaded
.
Trait Implementations
sourceimpl<'a> CostMatrixSet for CostMatrix<'a>
impl<'a> CostMatrixSet for CostMatrix<'a>
fn set_multi<D, B, P, V>(&mut self, data: D)where
D: IntoIterator<Item = B>,
B: Borrow<(P, V)>,
P: HasLocalPosition,
V: Borrow<u8>,
fn set<P, V>(&mut self, position: P, cost: V)where
P: HasLocalPosition,
V: Borrow<u8>,
sourceimpl Default for CostMatrix<'static>
impl Default for CostMatrix<'static>
sourceimpl<'a> Into<MultiRoomCostResult<'a>> for CostMatrix<'a>
impl<'a> Into<MultiRoomCostResult<'a>> for CostMatrix<'a>
sourcefn into(self) -> MultiRoomCostResult<'a>
fn into(self) -> MultiRoomCostResult<'a>
Converts this type into the (usually inferred) input type.
sourceimpl<'a> Into<SingleRoomCostResult<'a>> for CostMatrix<'a>
impl<'a> Into<SingleRoomCostResult<'a>> for CostMatrix<'a>
sourcefn into(self) -> SingleRoomCostResult<'a>
fn into(self) -> SingleRoomCostResult<'a>
Converts this type into the (usually inferred) input type.
Auto Trait Implementations
impl<'a> RefUnwindSafe for CostMatrix<'a>
impl<'a> Send for CostMatrix<'a>
impl<'a> Sync for CostMatrix<'a>
impl<'a> Unpin for CostMatrix<'a>
impl<'a> UnwindSafe for CostMatrix<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
impl<T, U> IntoExpectedType<U> for Twhere
U: FromExpectedType<T>,
sourcefn into_expected_type(self) -> Result<U, ConversionError>
fn into_expected_type(self) -> Result<U, ConversionError>
Casts this value as the target type, making the assumption that the types are correct. Read more