pub enum MovementResult<C> {
Success {
path: Vec<C>,
new_position: C,
},
OutOfRange {
requested_distance: u32,
maximum_range: u32,
},
PathTooLong {
path_length: u32,
maximum_range: u32,
},
NoPathFound,
}Expand description
Result of a movement attempt.
Variants§
Success
Movement was successful
Fields
§
new_position: CThe final position after movement
OutOfRange
Target is out of movement range
Fields
PathTooLong
Path exists but is too long
Fields
NoPathFound
No valid path to target
Trait Implementations§
Source§impl<C: Clone> Clone for MovementResult<C>
impl<C: Clone> Clone for MovementResult<C>
Source§fn clone(&self) -> MovementResult<C>
fn clone(&self) -> MovementResult<C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug> Debug for MovementResult<C>
impl<C: Debug> Debug for MovementResult<C>
Source§impl<C: PartialEq> PartialEq for MovementResult<C>
impl<C: PartialEq> PartialEq for MovementResult<C>
Source§fn eq(&self, other: &MovementResult<C>) -> bool
fn eq(&self, other: &MovementResult<C>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<C: PartialEq> StructuralPartialEq for MovementResult<C>
Auto Trait Implementations§
impl<C> Freeze for MovementResult<C>where
C: Freeze,
impl<C> RefUnwindSafe for MovementResult<C>where
C: RefUnwindSafe,
impl<C> Send for MovementResult<C>where
C: Send,
impl<C> Sync for MovementResult<C>where
C: Sync,
impl<C> Unpin for MovementResult<C>where
C: Unpin,
impl<C> UnsafeUnpin for MovementResult<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for MovementResult<C>where
C: 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