#[non_exhaustive]pub enum Error {
Show 17 variants
Domain {
what: &'static str,
value: f64,
},
Order(Order),
UnknownMaterial(String),
NoSuchMotor(String),
AmbiguousMotor {
name: String,
candidates: Vec<String>,
},
EmptyDesignation,
MotorCount(usize),
NoMotor,
NoSuchConfiguration(String),
DesignChecks(Vec<Finding>),
Catalog {
part: String,
problem: CatalogProblem,
},
Design(DesignError),
Motor(MotorError),
Sim(SimError),
Aero(AeroError),
Atmos(AtmosError),
Core(CoreError),
}Expand description
Anything the builder API can refuse: its own checks, and every error of the crates it calls.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Domain
A number outside its domain, such as a negative length or a NaN, found as it was given.
Order(Order)
Parts added in an order the rocket can’t be built in, such as fins before any body tube.
UnknownMaterial(String)
A material id that isn’t built in; hpr_design::materials lists them.
NoSuchMotor(String)
No motor with a thrust curve in the bundled catalog matches the name.
AmbiguousMotor
Several different motors match the name. Each is listed by its designation, which finds
it alone, then its manufacturer: I175WS (AeroTech).
EmptyDesignation
A motor with an empty designation, which the design would take as a duplicate id.
MotorCount(usize)
A motor file holds no motor, or more than one where one was expected.
NoMotor
A flight of a rocket with no motor: give it one with crate::Rocket::set_motor.
NoSuchConfiguration(String)
A configuration id the design doesn’t hold.
DesignChecks(Vec<Finding>)
The design’s checks (hpr_design::checks) found errors: every finding, errors and
warnings, in the checks’ order.
Catalog
A catalog part the builder can’t make into the part asked for.
Fields
problem: CatalogProblemWhat is wrong with it.
Design(DesignError)
From the design: its tree, parts and mass properties.
Motor(MotorError)
From the motor models and motor files.
Sim(SimError)
From the flight simulation.
Aero(AeroError)
From the aerodynamic model.
Atmos(AtmosError)
From the atmosphere and wind models.
Core(CoreError)
From the geodesy: a launch site that isn’t on the Earth.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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
use the Display impl or to_string()
Source§impl From<AtmosError> for Error
impl From<AtmosError> for Error
Source§fn from(source: AtmosError) -> Self
fn from(source: AtmosError) -> Self
Source§impl From<DesignError> for Error
impl From<DesignError> for Error
Source§fn from(source: DesignError) -> Self
fn from(source: DesignError) -> Self
Source§impl From<MotorError> for Error
impl From<MotorError> for Error
Source§fn from(source: MotorError) -> Self
fn from(source: MotorError) -> Self
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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