Enum dock_runtime::common::IntermediateError
source · pub enum IntermediateError<T>where
T: Config,{
Dispatch(DispatchError),
DispatchWithPostInfo(DispatchErrorWithPostInfo<PostDispatchInfo>),
__Marker(PhantomData<Error<T>>, Infallible),
}
Expand description
Either DispatchError
or DispatchErrorWithPostInfo
.
Variants§
Dispatch(DispatchError)
DispatchWithPostInfo(DispatchErrorWithPostInfo<PostDispatchInfo>)
__Marker(PhantomData<Error<T>>, Infallible)
Implementations§
source§impl<T> IntermediateError<T>where
T: Config,
impl<T> IntermediateError<T>where T: Config,
pub fn dispatch<E>(error: E) -> IntermediateError<T>where E: Into<DispatchError>,
pub fn did<E>(error: E) -> IntermediateError<T>where E: Into<Error<T>>,
pub fn dispatch_with_post_info<E>(error: E) -> IntermediateError<T>where E: Into<DispatchErrorWithPostInfo<PostDispatchInfo>>,
pub fn into_dispatch_with_post_info( self ) -> DispatchErrorWithPostInfo<PostDispatchInfo>
Trait Implementations§
source§impl<T> Clone for IntermediateError<T>where
T: Clone + Config,
impl<T> Clone for IntermediateError<T>where T: Clone + Config,
source§fn clone(&self) -> IntermediateError<T>
fn clone(&self) -> IntermediateError<T>
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<T> From<ActionExecutionError> for IntermediateError<T>where
T: Config,
impl<T> From<ActionExecutionError> for IntermediateError<T>where T: Config,
source§fn from(action_err: ActionExecutionError) -> IntermediateError<T>
fn from(action_err: ActionExecutionError) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> From<DispatchError> for IntermediateError<T>where
T: Config,
impl<T> From<DispatchError> for IntermediateError<T>where T: Config,
source§fn from(dispatch_err: DispatchError) -> IntermediateError<T>
fn from(dispatch_err: DispatchError) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> From<DispatchErrorWithPostInfo<PostDispatchInfo>> for IntermediateError<T>where
T: Config,
impl<T> From<DispatchErrorWithPostInfo<PostDispatchInfo>> for IntermediateError<T>where T: Config,
source§fn from(
dispatch_with_post_info_err: DispatchErrorWithPostInfo<PostDispatchInfo>
) -> IntermediateError<T>
fn from( dispatch_with_post_info_err: DispatchErrorWithPostInfo<PostDispatchInfo> ) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> From<Error<T>> for IntermediateError<T>where
T: Config,
impl<T> From<Error<T>> for IntermediateError<T>where T: Config,
source§fn from(err: Error<T>) -> IntermediateError<T>
fn from(err: Error<T>) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> From<NonceError> for IntermediateError<T>where
T: Config,
impl<T> From<NonceError> for IntermediateError<T>where T: Config,
source§fn from(nonce_err: NonceError) -> IntermediateError<T>
fn from(nonce_err: NonceError) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> From<PolicyValidationError> for IntermediateError<T>where
T: Config,
impl<T> From<PolicyValidationError> for IntermediateError<T>where T: Config,
source§fn from(policy_err: PolicyValidationError) -> IntermediateError<T>
fn from(policy_err: PolicyValidationError) -> IntermediateError<T>
Converts to this type from the input type.
source§impl<T> PartialEq<IntermediateError<T>> for IntermediateError<T>where
T: PartialEq<T> + Config,
impl<T> PartialEq<IntermediateError<T>> for IntermediateError<T>where T: PartialEq<T> + Config,
source§fn eq(&self, other: &IntermediateError<T>) -> bool
fn eq(&self, other: &IntermediateError<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<T> Eq for IntermediateError<T>where T: Eq + Config,
impl<T> StructuralEq for IntermediateError<T>where T: Config,
impl<T> StructuralPartialEq for IntermediateError<T>where T: Config,
Auto Trait Implementations§
impl<T> RefUnwindSafe for IntermediateError<T>where T: RefUnwindSafe,
impl<T> Send for IntermediateError<T>where T: Send,
impl<T> Sync for IntermediateError<T>where T: Sync,
impl<T> Unpin for IntermediateError<T>where T: Unpin,
impl<T> UnwindSafe for IntermediateError<T>where T: UnwindSafe,
Blanket Implementations§
source§impl<T> CanUpdate<()> for T
impl<T> CanUpdate<()> for T
source§fn can_remove(&self, _entity: &()) -> bool
fn can_remove(&self, _entity: &()) -> bool
Checks whether the existing entity can be removed.
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where Self: TryInto<T>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for Swhere
T: Bounded,
S: TryInto<T>,
impl<T, S> UniqueSaturatedInto<T> for Swhere T: Bounded, S: TryInto<T>,
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.§impl<T> WithPostDispatchInfo for Twhere
T: Into<DispatchError>,
impl<T> WithPostDispatchInfo for Twhere T: Into<DispatchError>,
§fn with_weight(
self,
actual_weight: Weight
) -> DispatchErrorWithPostInfo<PostDispatchInfo>
fn with_weight( self, actual_weight: Weight ) -> DispatchErrorWithPostInfo<PostDispatchInfo>
Call this on your modules custom errors type in order to return a custom weight on error. Read more