pub enum Decay<O: StdError> {
Internal {
note: Note,
place: CodePlaceChain,
},
External {
error: O,
},
Further {
note: Note,
place: CodePlaceChain,
error: Box<Decay<O>>,
},
}
Variants
Implementations
sourceimpl<O: StdError> Decay<O>
impl<O: StdError> Decay<O>
pub fn new<N: Into<Note>>(place: CodePlace, note: N) -> Self
pub fn new_unnoted(place: CodePlace) -> Self
pub fn further<N: Into<Note>>(self, new_place: CodePlace, note: N) -> Self
pub fn further_unnoted(self, new_place: CodePlace) -> Self
pub fn morph<N: Into<Note>, E: IntoDecay<O, L>, const L: usize>(
new_place: CodePlace,
note: N
) -> impl FnOnce(E) -> Self
pub fn morph_unnoted<E: IntoDecay<O, L>, const L: usize>(
new_place: CodePlace
) -> impl FnOnce(E) -> Self
Trait Implementations
sourceimpl<O: StdError + 'static> Error for Decay<O>
impl<O: StdError + 'static> Error for Decay<O>
sourcefn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl<'a, O: StdError> IntoIterator for &'a Decay<O>
impl<'a, O: StdError> IntoIterator for &'a Decay<O>
sourceimpl<O: StdError + Serialize + JsonSchema> JsonSchema for Decay<O>
Available on crate features serde
and schema
only.
impl<O: StdError + Serialize + JsonSchema> JsonSchema for Decay<O>
Available on crate features
serde
and schema
only.sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Always returns true since Decay is complex enough to be referenced when possible.
sourcefn schema_name() -> String
fn schema_name() -> String
Will return name like “Decay(
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Since Decay serializes just the same way as DecayDeser, they obviously share the same schema, which is returned here.
sourceimpl<O: PartialEq + StdError> PartialEq<Decay<O>> for Decay<O>
impl<O: PartialEq + StdError> PartialEq<Decay<O>> for Decay<O>
sourceimpl<O: StdError + Serialize> Serialize for Decay<O>
Available on crate feature serde
only.
impl<O: StdError + Serialize> Serialize for Decay<O>
Available on crate feature
serde
only.Serialization implementation for Decay through serde. Since some information is assumed redundant for inter-service communication, it is ommited in serialized version. Thus deserialization into the strictly same type becomes actually impossible. Deserialization into DecayDeser is provided as a replacement.
impl<O: Eq + StdError> Eq for Decay<O>
impl<O: StdError> StructuralEq for Decay<O>
impl<O: StdError> StructuralPartialEq for Decay<O>
Auto Trait Implementations
impl<O> RefUnwindSafe for Decay<O>where
O: RefUnwindSafe,
impl<O> Send for Decay<O>where
O: Send,
impl<O> Sync for Decay<O>where
O: Sync,
impl<O> Unpin for Decay<O>where
O: Unpin,
impl<O> UnwindSafe for Decay<O>where
O: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.