pub enum TraceResult<Ok, Err> {
Success {
result: Ok,
tx_hash: Option<TxHash>,
},
Error {
error: Err,
tx_hash: Option<TxHash>,
},
}
Expand description
The result of a single transaction trace.
Variants§
Implementations§
Source§impl<Ok, Err> TraceResult<Ok, Err>
impl<Ok, Err> TraceResult<Ok, Err>
Sourcepub const fn tx_hash(&self) -> Option<TxHash>
pub const fn tx_hash(&self) -> Option<TxHash>
Returns the hash of the transaction that was traced.
Sourcepub const fn success(&self) -> Option<&Ok>
pub const fn success(&self) -> Option<&Ok>
Returns a reference to the result if it is a success variant.
Sourcepub const fn error(&self) -> Option<&Err>
pub const fn error(&self) -> Option<&Err>
Returns a reference to the error if it is an error variant.
Sourcepub const fn is_success(&self) -> bool
pub const fn is_success(&self) -> bool
Checks if the result is a success.
Sourcepub const fn new_success(result: Ok, tx_hash: Option<TxHash>) -> Self
pub const fn new_success(result: Ok, tx_hash: Option<TxHash>) -> Self
Creates a new success trace result.
Trait Implementations§
Source§impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>
impl<Ok: Clone, Err: Clone> Clone for TraceResult<Ok, Err>
Source§fn clone(&self) -> TraceResult<Ok, Err>
fn clone(&self) -> TraceResult<Ok, Err>
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, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>where
Ok: Deserialize<'de>,
Err: Deserialize<'de>,
impl<'de, Ok, Err> Deserialize<'de> for TraceResult<Ok, Err>where
Ok: Deserialize<'de>,
Err: 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<Ok, Err> Serialize for TraceResult<Ok, Err>
impl<Ok, Err> Serialize for TraceResult<Ok, Err>
impl<Ok: Eq, Err: Eq> Eq for TraceResult<Ok, Err>
impl<Ok, Err> StructuralPartialEq for TraceResult<Ok, Err>
Auto Trait Implementations§
impl<Ok, Err> Freeze for TraceResult<Ok, Err>
impl<Ok, Err> RefUnwindSafe for TraceResult<Ok, Err>where
Ok: RefUnwindSafe,
Err: RefUnwindSafe,
impl<Ok, Err> Send for TraceResult<Ok, Err>
impl<Ok, Err> Sync for TraceResult<Ok, Err>
impl<Ok, Err> Unpin for TraceResult<Ok, Err>
impl<Ok, Err> UnwindSafe for TraceResult<Ok, Err>where
Ok: UnwindSafe,
Err: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more