pub struct HookError {
pub code: String,
pub message: String,
pub retryable: bool,
}Expand description
A hook’s error as it crosses back to the host: the hook’s code and message, and whether
another try may pass. The host keeps the code when it is a short [A-Z0-9_] token and the
retry flag, and cuts the message short. Only an error that sets retryable itself is
retried; one converted from an AlienError is final, since a hook gives the same answer to
the same input.
Fields§
§code: String§message: String§retryable: boolImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HookError
impl<'de> Deserialize<'de> for HookError
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
impl Eq for HookError
Source§impl Error for HookError
impl Error for HookError
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<E> From<AlienError<E>> for HookError
A hook written with the Rust SDK reports its errors as final: a hook computes from its input
alone, so another try gives the same answer. The runtime keeps the flag a module sets, for a
module that sets it itself.
impl<E> From<AlienError<E>> for HookError
A hook written with the Rust SDK reports its errors as final: a hook computes from its input alone, so another try gives the same answer. The runtime keeps the flag a module sets, for a module that sets it itself.
Source§fn from(error: AlienError<E>) -> Self
fn from(error: AlienError<E>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for HookError
Auto Trait Implementations§
impl Forget for HookError
impl Freeze for HookError
impl Move for HookError
impl RefUnwindSafe for HookError
impl Send for HookError
impl Sync for HookError
impl Unpin for HookError
impl UnsafeUnpin for HookError
impl UnwindSafe for HookError
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<E> IntoAlienErrorDirect for Ewhere
E: Error + 'static,
impl<E> IntoAlienErrorDirect for Ewhere
E: Error + 'static,
Source§fn into_alien_error(self) -> AlienError
fn into_alien_error(self) -> AlienError
Convert a standard error into an AlienError