#[non_exhaustive]pub enum MapError {
Route(RouteError),
NoTargets,
TargetOutside {
index: usize,
},
InvalidFactor {
index: usize,
},
InvalidWeight {
index: usize,
},
InvalidSpacing,
CostCrossing {
index: usize,
},
}Expand description
Why no distance map was built.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Route(RouteError)
The region, a barrier or a target is malformed, or the input is
over budget (RouteError::TooManyVertices, whose lower bound is
zero here: there is no single pair of endpoints).
NoTargets
No targets were given.
TargetOutside
A target lies outside the free-space region.
InvalidFactor
A cost region’s factor is below 1 or not finite.
InvalidWeight
A target’s weight is negative or not finite.
InvalidSpacing
The spacing of points along cost edges is not positive and finite.
CostCrossing
A cost region’s edge properly crosses a region edge, a barrier or another cost region’s edge, or runs along a barrier. Cost regions may nest, touch and share edges, and run along the region’s boundary; crossings would need rounded vertices, not supported yet.
Trait Implementations§
Source§impl From<RouteError> for MapError
impl From<RouteError> for MapError
Source§fn from(error: RouteError) -> MapError
fn from(error: RouteError) -> MapError
Converts to this type from the input type.
impl Copy for MapError
impl StructuralPartialEq for MapError
Auto Trait Implementations§
impl Freeze for MapError
impl RefUnwindSafe for MapError
impl Send for MapError
impl Sync for MapError
impl Unpin for MapError
impl UnwindSafe for MapError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more