Struct screeps::pathfinder::SearchOptions
source · pub struct SearchOptions<F>{ /* private fields */ }
Implementations§
source§impl<F> SearchOptions<F>
impl<F> SearchOptions<F>
pub fn new(callback: F) -> Self
pub fn room_callback<F2>(self, callback: F2) -> SearchOptions<F2>
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§
Auto Trait Implementations§
impl<F> RefUnwindSafe for SearchOptions<F>where
F: RefUnwindSafe,
impl<F> Send for SearchOptions<F>where
F: Send,
impl<F> Sync for SearchOptions<F>where
F: Sync,
impl<F> Unpin for SearchOptions<F>where
F: Unpin,
impl<F> UnwindSafe for SearchOptions<F>where
F: UnwindSafe,
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