Struct ckb_jsonrpc_types::TransactionWithStatus
source · [−]pub struct TransactionWithStatus {
pub transaction: Option<TransactionView>,
pub tx_status: TxStatus,
}Expand description
The JSON view of a transaction as well as its status.
Fields
transaction: Option<TransactionView>The transaction.
tx_status: TxStatusThe Transaction status.
Implementations
sourceimpl TransactionWithStatus
impl TransactionWithStatus
sourcepub fn with_pending(tx: Option<TransactionView>) -> Self
pub fn with_pending(tx: Option<TransactionView>) -> Self
Build with pending status
sourcepub fn with_proposed(tx: Option<TransactionView>) -> Self
pub fn with_proposed(tx: Option<TransactionView>) -> Self
Build with proposed status
sourcepub fn with_committed(tx: Option<TransactionView>, hash: H256) -> Self
pub fn with_committed(tx: Option<TransactionView>, hash: H256) -> Self
Build with committed status
sourcepub fn with_rejected(reason: String) -> Self
pub fn with_rejected(reason: String) -> Self
Build with rejected status
sourcepub fn with_unknown() -> Self
pub fn with_unknown() -> Self
Build with rejected status
sourcepub fn status_only(tx_status: TxStatus) -> Self
pub fn status_only(tx_status: TxStatus) -> Self
Build with status only
sourcepub fn is_unknown(&self) -> bool
pub fn is_unknown(&self) -> bool
Returns true if the tx_status is Unknown.
Trait Implementations
sourceimpl Clone for TransactionWithStatus
impl Clone for TransactionWithStatus
sourcefn clone(&self) -> TransactionWithStatus
fn clone(&self) -> TransactionWithStatus
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for TransactionWithStatus
impl Debug for TransactionWithStatus
sourceimpl<'de> Deserialize<'de> for TransactionWithStatus
impl<'de> Deserialize<'de> for TransactionWithStatus
sourcefn 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
sourceimpl Hash for TransactionWithStatus
impl Hash for TransactionWithStatus
sourceimpl PartialEq<TransactionWithStatus> for TransactionWithStatus
impl PartialEq<TransactionWithStatus> for TransactionWithStatus
sourcefn eq(&self, other: &TransactionWithStatus) -> bool
fn eq(&self, other: &TransactionWithStatus) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &TransactionWithStatus) -> bool
fn ne(&self, other: &TransactionWithStatus) -> bool
This method tests for !=.
sourceimpl Serialize for TransactionWithStatus
impl Serialize for TransactionWithStatus
impl Eq for TransactionWithStatus
impl StructuralEq for TransactionWithStatus
impl StructuralPartialEq for TransactionWithStatus
Auto Trait Implementations
impl RefUnwindSafe for TransactionWithStatus
impl Send for TransactionWithStatus
impl Sync for TransactionWithStatus
impl Unpin for TransactionWithStatus
impl UnwindSafe for TransactionWithStatus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more