Struct screeps::pathfinder::SearchOptions
source · pub struct SearchOptions<'a, F>where
F: Fn(String) -> CostMatrix<'a>,{ /* private fields */ }Implementations
sourceimpl SearchOptions<'static, fn(_: String) -> CostMatrix<'static>>
impl SearchOptions<'static, fn(_: String) -> CostMatrix<'static>>
sourceimpl<'a, F> SearchOptions<'a, F>where
F: Fn(String) -> CostMatrix<'a>,
impl<'a, F> SearchOptions<'a, F>where
F: Fn(String) -> CostMatrix<'a>,
sourcepub fn room_callback<'b, F2>(self, room_callback: F2) -> SearchOptions<'b, F2>where
F2: Fn(String) -> CostMatrix<'b>,
pub fn room_callback<'b, F2>(self, room_callback: F2) -> SearchOptions<'b, F2>where
F2: Fn(String) -> CostMatrix<'b>,
Sets room callback - default |_| { CostMatrix::default() }.
sourcepub fn plain_cost(self, cost: u8) -> Self
pub fn plain_cost(self, cost: u8) -> Self
Sets plain cost - default 1.
sourcepub fn swamp_cost(self, cost: u8) -> Self
pub fn swamp_cost(self, cost: u8) -> Self
Sets swamp cost - default 5.
sourcepub fn heuristic_weight(self, weight: f64) -> Self
pub fn heuristic_weight(self, weight: f64) -> Self
Sets heuristic weight - default 1.2.
Trait Implementations
sourceimpl Default for SearchOptions<'static, fn(_: String) -> CostMatrix<'static>>
impl Default for SearchOptions<'static, fn(_: String) -> CostMatrix<'static>>
Auto Trait Implementations
impl<'a, F> RefUnwindSafe for SearchOptions<'a, F>where
F: RefUnwindSafe,
impl<'a, F> Send for SearchOptions<'a, F>where
F: Send,
impl<'a, F> Sync for SearchOptions<'a, F>where
F: Sync,
impl<'a, F> Unpin for SearchOptions<'a, F>where
F: Unpin,
impl<'a, F> UnwindSafe for SearchOptions<'a, F>where
F: UnwindSafe,
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