#[non_exhaustive]pub enum InGenError {
Other(Box<dyn Error + Send + Sync>),
Gen(Box<GenError>),
Insert(InsertError),
Provider(ProviderError),
Space(Error),
SetCube(SetCubeError),
UniverseTransaction(ExecuteError<UniverseTransaction>),
SpaceTransaction(ExecuteError<SpaceTransaction>),
}Expand description
Aggregation of types of errors that might occur in “world generation”.
This is distinct from GenError in that this type is returned from functions
responsible for generation, and that type is returned from functions that
manage generation — that invoke the first kind and (usually) store its result
in the Universe. This separation is intended to encourage more precise
attribution of the source of the error despite implicit conversions, because a
“nested” GenError will be obligated to be wrapped in InGenError rather than
mistakenly taken as the same level.
TODO: Work this into a coherent set of error cases rather than purely “I saw one of these once, so add it”.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Other(Box<dyn Error + Send + Sync>)
Generic error container for unusual situations.
Gen(Box<GenError>)
Something else needed to be generated and that failed.
Insert(InsertError)
Failed to insert the generated items in the Universe.
Provider(ProviderError)
Failed to find a needed dependency.
Space(Error)
Failed during Space construction.
SetCube(SetCubeError)
Failed during Space manipulation.
UniverseTransaction(ExecuteError<UniverseTransaction>)
Failed during a transaction executed as part of generation.
SpaceTransaction(ExecuteError<SpaceTransaction>)
Failed during a transaction executed as part of generation.
Implementations§
Trait Implementations§
Source§impl Debug for InGenError
impl Debug for InGenError
Source§impl Display for InGenError
impl Display for InGenError
Source§impl Error for InGenError
impl Error for InGenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for InGenError
impl From<Error> for InGenError
Source§impl From<ExecuteError<SpaceTransaction>> for InGenError
impl From<ExecuteError<SpaceTransaction>> for InGenError
Source§fn from(error: ExecuteError<SpaceTransaction>) -> Self
fn from(error: ExecuteError<SpaceTransaction>) -> Self
Source§impl From<ExecuteError> for InGenError
impl From<ExecuteError> for InGenError
Source§fn from(error: ExecuteError<UniverseTransaction>) -> Self
fn from(error: ExecuteError<UniverseTransaction>) -> Self
Source§impl From<GenError> for InGenError
impl From<GenError> for InGenError
Source§impl From<InsertError> for InGenError
impl From<InsertError> for InGenError
Source§fn from(error: InsertError) -> Self
fn from(error: InsertError) -> Self
Source§impl From<ProviderError> for InGenError
impl From<ProviderError> for InGenError
Source§fn from(error: ProviderError) -> Self
fn from(error: ProviderError) -> Self
Source§impl From<SetCubeError> for InGenError
impl From<SetCubeError> for InGenError
Source§fn from(error: SetCubeError) -> Self
fn from(error: SetCubeError) -> Self
Auto Trait Implementations§
impl Freeze for InGenError
impl !RefUnwindSafe for InGenError
impl Send for InGenError
impl Sync for InGenError
impl Unpin for InGenError
impl !UnwindSafe for InGenError
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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>
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>
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