pub enum InteractionError<E: Debug + Display> {
DuplicateId(AgentId),
AgentNotFound(AgentId),
SpaceIndexMissing(AgentId),
SpaceIndexDuplicate(AgentId),
Space(E),
RollbackFailed {
operation: &'static str,
source: E,
rollback: E,
},
}Expand description
Errors that can occur during space interaction operations.
Variants§
DuplicateId(AgentId)
An agent with this ID already exists in the store.
AgentNotFound(AgentId)
No agent with this ID was found.
SpaceIndexMissing(AgentId)
The agent store and spatial index disagree about this agent.
SpaceIndexDuplicate(AgentId)
The agent appears more than once in the spatial index at its stored position.
Space(E)
The underlying space reported an error (e.g. out of bounds).
RollbackFailed
A rollback failed after a space mutation error, leaving the model in an unknown state.
Trait Implementations§
Source§impl<E> Display for InteractionError<E>
impl<E> Display for InteractionError<E>
Source§impl<E> Error for InteractionError<E>
impl<E> Error for InteractionError<E>
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl<E> Freeze for InteractionError<E>where
E: Freeze,
impl<E> RefUnwindSafe for InteractionError<E>where
E: RefUnwindSafe,
impl<E> Send for InteractionError<E>where
E: Send,
impl<E> Sync for InteractionError<E>where
E: Sync,
impl<E> Unpin for InteractionError<E>where
E: Unpin,
impl<E> UnsafeUnpin for InteractionError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for InteractionError<E>where
E: 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