Struct lattice_qcd_rs::error::ErrorWithOwnedValue
source · pub struct ErrorWithOwnedValue<Error, State> { /* private fields */ }
Expand description
A struct that combine an error with a owned value
Implementations§
source§impl<Error, State> ErrorWithOwnedValue<Error, State>
impl<Error, State> ErrorWithOwnedValue<Error, State>
sourcepub const fn new(error: Error, owned: State) -> Self
pub const fn new(error: Error, owned: State) -> Self
Create a new Self with an error and an owned value
sourcepub fn deconstruct(self) -> (Error, State)
pub fn deconstruct(self) -> (Error, State)
Deconstruct the structure.
sourcepub fn error_owned(self) -> Error
pub fn error_owned(self) -> Error
Deconstruct the structure returning the error and discarding the owned value.
Trait Implementations§
source§impl<Error: Clone, State: Clone> Clone for ErrorWithOwnedValue<Error, State>
impl<Error: Clone, State: Clone> Clone for ErrorWithOwnedValue<Error, State>
source§fn clone(&self) -> ErrorWithOwnedValue<Error, State>
fn clone(&self) -> ErrorWithOwnedValue<Error, State>
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<'de, Error, State> Deserialize<'de> for ErrorWithOwnedValue<Error, State>where
Error: Deserialize<'de>,
State: Deserialize<'de>,
impl<'de, Error, State> Deserialize<'de> for ErrorWithOwnedValue<Error, State>where Error: Deserialize<'de>, State: Deserialize<'de>,
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<E: Display + Error + Debug + 'static, State: Display + Debug> Error for ErrorWithOwnedValue<E, State>
impl<E: Display + Error + Debug + 'static, State: Display + Debug> Error for ErrorWithOwnedValue<E, State>
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<Error, State> From<(Error, State)> for ErrorWithOwnedValue<Error, State>
impl<Error, State> From<(Error, State)> for ErrorWithOwnedValue<Error, State>
source§fn from(data: (Error, State)) -> Self
fn from(data: (Error, State)) -> Self
Converts to this type from the input type.
source§impl<Error, Data1, Data2> From<ErrorWithOwnedValue<Error, (Data1, Data2)>> for ErrorWithOwnedValue<Error, Data1>
impl<Error, Data1, Data2> From<ErrorWithOwnedValue<Error, (Data1, Data2)>> for ErrorWithOwnedValue<Error, Data1>
source§fn from(data: ErrorWithOwnedValue<Error, (Data1, Data2)>) -> Self
fn from(data: ErrorWithOwnedValue<Error, (Data1, Data2)>) -> Self
Converts to this type from the input type.
source§impl<State> From<ErrorWithOwnedValue<StateInitializationError, State>> for StateInitializationError
impl<State> From<ErrorWithOwnedValue<StateInitializationError, State>> for StateInitializationError
source§fn from(data: ErrorWithOwnedValue<StateInitializationError, State>) -> Self
fn from(data: ErrorWithOwnedValue<StateInitializationError, State>) -> Self
Converts to this type from the input type.
source§impl<Error: Ord, State: Ord> Ord for ErrorWithOwnedValue<Error, State>
impl<Error: Ord, State: Ord> Ord for ErrorWithOwnedValue<Error, State>
source§fn cmp(&self, other: &ErrorWithOwnedValue<Error, State>) -> Ordering
fn cmp(&self, other: &ErrorWithOwnedValue<Error, State>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Error: PartialEq, State: PartialEq> PartialEq<ErrorWithOwnedValue<Error, State>> for ErrorWithOwnedValue<Error, State>
impl<Error: PartialEq, State: PartialEq> PartialEq<ErrorWithOwnedValue<Error, State>> for ErrorWithOwnedValue<Error, State>
source§fn eq(&self, other: &ErrorWithOwnedValue<Error, State>) -> bool
fn eq(&self, other: &ErrorWithOwnedValue<Error, State>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Error: PartialOrd, State: PartialOrd> PartialOrd<ErrorWithOwnedValue<Error, State>> for ErrorWithOwnedValue<Error, State>
impl<Error: PartialOrd, State: PartialOrd> PartialOrd<ErrorWithOwnedValue<Error, State>> for ErrorWithOwnedValue<Error, State>
source§fn partial_cmp(
&self,
other: &ErrorWithOwnedValue<Error, State>
) -> Option<Ordering>
fn partial_cmp( &self, other: &ErrorWithOwnedValue<Error, State> ) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<Error, State> Serialize for ErrorWithOwnedValue<Error, State>where
Error: Serialize,
State: Serialize,
impl<Error, State> Serialize for ErrorWithOwnedValue<Error, State>where Error: Serialize, State: Serialize,
impl<Error: Copy, State: Copy> Copy for ErrorWithOwnedValue<Error, State>
impl<Error: Eq, State: Eq> Eq for ErrorWithOwnedValue<Error, State>
impl<Error, State> StructuralEq for ErrorWithOwnedValue<Error, State>
impl<Error, State> StructuralPartialEq for ErrorWithOwnedValue<Error, State>
Auto Trait Implementations§
impl<Error, State> RefUnwindSafe for ErrorWithOwnedValue<Error, State>where Error: RefUnwindSafe, State: RefUnwindSafe,
impl<Error, State> Send for ErrorWithOwnedValue<Error, State>where Error: Send, State: Send,
impl<Error, State> Sync for ErrorWithOwnedValue<Error, State>where Error: Sync, State: Sync,
impl<Error, State> Unpin for ErrorWithOwnedValue<Error, State>where Error: Unpin, State: Unpin,
impl<Error, State> UnwindSafe for ErrorWithOwnedValue<Error, State>where Error: UnwindSafe, State: UnwindSafe,
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.