pub enum PolySimError {
Parse(ParseError),
BuildStrategy(String),
NoStochasticObject,
RepeatUnitCount {
architecture: &'static str,
got: usize,
need_min: usize,
},
InvalidBlockRatios {
sum: f64,
},
InvalidFractions {
sum: f64,
},
EmptyEnsemble,
RingNumberOverflow {
max_ring: u32,
max_supported: u32,
},
}Expand description
All errors that can be produced by polysim operations.
Variants§
Parse(ParseError)
A BigSMILES string could not be parsed.
BuildStrategy(String)
The BuildStrategy is invalid or not yet supported.
NoStochasticObject
The BigSMILES contains no stochastic object ({...}), so no repeat units
are available for chain generation.
RepeatUnitCount
The stochastic object contains the wrong number of repeat units for the requested architecture.
InvalidBlockRatios
The block ratios supplied to a block copolymer ensemble do not sum to 1.0.
InvalidFractions
The weight fractions supplied to a copolymer builder do not sum to 1.0.
EmptyEnsemble
An ensemble was created with zero chains.
RingNumberOverflow
A single repeat unit already uses more than 99 distinct ring-closure numbers, which exceeds the SMILES specification.
Trait Implementations§
Source§impl Debug for PolySimError
impl Debug for PolySimError
Source§impl Display for PolySimError
impl Display for PolySimError
Source§impl Error for PolySimError
impl Error for PolySimError
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()
Source§impl From<ParseError> for PolySimError
impl From<ParseError> for PolySimError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PolySimError
impl RefUnwindSafe for PolySimError
impl Send for PolySimError
impl Sync for PolySimError
impl Unpin for PolySimError
impl UnsafeUnpin for PolySimError
impl UnwindSafe for PolySimError
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