pub enum CrystalError {
InvalidLatticeConstant(f64),
InvalidTemperature(f64),
UnknownAtomicNumber(u8),
ZeroIndex([i32; 3]),
InvalidMillerBravais {
indices: [i32; 4],
why: &'static str,
},
NotHexagonal,
InvalidInternalParameter(f64),
InvalidStacking {
stacking: String,
why: &'static str,
},
ReferenceNotInPlane {
normal: [i32; 3],
reference: [i32; 3],
dot: i64,
},
InvalidSearch {
name: &'static str,
why: &'static str,
},
InvalidAngle {
name: &'static str,
value: f64,
why: &'static str,
},
}Expand description
Errors from building lattices, orientations and divergence models.
Variants§
InvalidLatticeConstant(f64)
The lattice constant was zero, negative or not finite.
InvalidTemperature(f64)
The temperature was negative or not finite.
UnknownAtomicNumber(u8)
Atomic number outside the element table.
ZeroIndex([i32; 3])
A Miller index or direction index triple was all zero.
InvalidMillerBravais
A four-index (Miller-Bravais) plane or direction broke its constraint.
NotHexagonal
Four-index input was used with a lattice that is not hexagonal.
InvalidInternalParameter(f64)
A wurtzite or polytype internal parameter u was outside (0, 1/2)
or not finite.
InvalidStacking
A polytype stacking sequence was not valid.
ReferenceNotInPlane
The in-plane reference direction does not lie in the surface plane
(the zone law h u + k v + l w = 0 fails).
Fields
InvalidSearch
A lattice-search argument was invalid.
InvalidAngle
An angle was out of range or not finite.
Trait Implementations§
Source§impl Clone for CrystalError
impl Clone for CrystalError
Source§fn clone(&self) -> CrystalError
fn clone(&self) -> CrystalError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CrystalError
impl Debug for CrystalError
Source§impl Display for CrystalError
impl Display for CrystalError
Source§impl Error for CrystalError
impl Error for CrystalError
1.30.0 · 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 PartialEq for CrystalError
impl PartialEq for CrystalError
impl StructuralPartialEq for CrystalError
Auto Trait Implementations§
impl Freeze for CrystalError
impl RefUnwindSafe for CrystalError
impl Send for CrystalError
impl Sync for CrystalError
impl Unpin for CrystalError
impl UnsafeUnpin for CrystalError
impl UnwindSafe for CrystalError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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