#[non_exhaustive]pub struct Reach {
pub target: usize,
pub route: Route,
pub distance: f64,
}Expand description
The nearest target from a point, and the route there.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target: usizeIndex of the nearest target in the targets given. Ties go to the route through the lowest graph vertex, deterministically.
route: RouteThe route, from the query point to the target. Its length is the
route’s own, without the target’s weight.
distance: f64The distance: the route’s length plus the target’s weight (see
distance_map_weighted); the route’s length when all weights are
zero.
Trait Implementations§
impl StructuralPartialEq for Reach
Auto Trait Implementations§
impl Freeze for Reach
impl RefUnwindSafe for Reach
impl Send for Reach
impl Sync for Reach
impl Unpin for Reach
impl UnwindSafe for Reach
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