pub enum SphericalCowError {
NegativeRadius,
NegativeExtents,
Uncontained,
NoneSetF,
NoneFront,
}Expand description
All errors thrown by the library
Variants§
NegativeRadius
If a sphere is given a negative radius.
NegativeExtents
If a cuboid is given a negative half extent.
Uncontained
If a sphere is created but is not confined by the Container.
This happens quite a lot and is generally handled silently. This error
is only thrown by the init_spheres method. Usually this means the geometry
of the container is perhaps not aligned to the origin, it is scaled too small,
or the spheres you’re attempting to pack are too large.
NoneSetF
We choose a random value from the set_f vector. rand returns an option and we pop
the value. If it’s None this error is thrown. Due to the contstuction of the
rest of the method, it’s safe to say this is unreachable.
NoneFront
We choose a random value from the front vector. rand returns an option and we pop
the value. If it’s None this error is thrown. Due to the contstuction of the
rest of the method, it’s safe to say this is unreachable.
Trait Implementations§
Source§impl Debug for SphericalCowError
impl Debug for SphericalCowError
Source§impl Display for SphericalCowError
impl Display for SphericalCowError
Source§impl Error for SphericalCowError
impl Error for SphericalCowError
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for SphericalCowError
impl RefUnwindSafe for SphericalCowError
impl Send for SphericalCowError
impl Sync for SphericalCowError
impl Unpin for SphericalCowError
impl UnwindSafe for SphericalCowError
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.