Enum all_is_cubes::linking::InGenError
source · #[non_exhaustive]pub enum InGenError {
Other(Box<dyn ErrorIfStd + Send + Sync>),
Gen(Box<GenError>),
Insert(InsertError),
Provider(ProviderError),
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 ErrorIfStd + 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.
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§
source§impl InGenError
impl InGenError
sourcepub fn other<E: ErrorIfStd + Send + Sync + 'static>(error: E) -> Self
pub fn other<E: ErrorIfStd + Send + Sync + 'static>(error: E) -> Self
Convert an arbitrary error to InGenError.
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<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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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