Enum lattice_qcd_rs::error::ImplementationError
source · #[non_exhaustive]
pub enum ImplementationError {
Unreachable,
OptionWithUnexpectedNone,
}
Expand description
Errors in the implementation of the library. This is unwanted to return this type but sometimes this is better to return that instead of panicking. It is also used in some example.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Unreachable
We attain a portion of the code that was thought to be unreachable.
OptionWithUnexpectedNone
An option contained an unexpected None value.
Used when needing to return a dyn Error but std::option::NoneError
does not implement Error
Trait Implementations§
source§impl Clone for ImplementationError
impl Clone for ImplementationError
source§fn clone(&self) -> ImplementationError
fn clone(&self) -> ImplementationError
Returns a copy of the value. Read more
1.0.0 · 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 ImplementationError
impl Debug for ImplementationError
source§impl<'de> Deserialize<'de> for ImplementationError
impl<'de> Deserialize<'de> for ImplementationError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ImplementationError
impl Display for ImplementationError
source§impl Error for ImplementationError
impl Error for ImplementationError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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 Hash for ImplementationError
impl Hash for ImplementationError
source§impl PartialEq<ImplementationError> for ImplementationError
impl PartialEq<ImplementationError> for ImplementationError
source§fn eq(&self, other: &ImplementationError) -> bool
fn eq(&self, other: &ImplementationError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ImplementationError
impl Serialize for ImplementationError
impl Copy for ImplementationError
impl Eq for ImplementationError
impl StructuralEq for ImplementationError
impl StructuralPartialEq for ImplementationError
Auto Trait Implementations§
impl RefUnwindSafe for ImplementationError
impl Send for ImplementationError
impl Sync for ImplementationError
impl Unpin for ImplementationError
impl UnwindSafe for ImplementationError
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.