pub struct GetTransaction {Show 20 fields
pub amount: SignedAmount,
pub confirmations: u64,
pub generated: Option<bool>,
pub trusted: Option<bool>,
pub blockhash: Option<String>,
pub blockheight: Option<u64>,
pub blockindex: Option<u32>,
pub blocktime: Option<u64>,
pub txid: Txid,
pub wtxid: String,
pub walletconflicts: Vec<String>,
pub replaced_by_txid: Option<String>,
pub replaces_txid: Option<String>,
pub comment: Option<String>,
pub to: Option<String>,
pub time: u64,
pub timereceived: u64,
pub bip125_replaceable: String,
pub details: Vec<GetTransactionDetail>,
pub hex: Transaction,
}
Expand description
Models the result of JSON-RPC method listunspent
.
§Note
This assumes that the UTXOs are present in the underlying Bitcoin client’s wallet.
Careful with the amount field. It is a SignedAmount
, hence can be negative.
Negative amounts for the TransactionCategory::Send
, and is positive
for all other categories.
Fields§
§amount: SignedAmount
The signed amount in BTC.
confirmations: u64
The signed fee in BTC.
generated: Option<bool>
§trusted: Option<bool>
§blockhash: Option<String>
§blockheight: Option<u64>
§blockindex: Option<u32>
§blocktime: Option<u64>
§txid: Txid
The transaction id.
wtxid: String
§walletconflicts: Vec<String>
§replaced_by_txid: Option<String>
§replaces_txid: Option<String>
§comment: Option<String>
§to: Option<String>
§time: u64
§timereceived: u64
§bip125_replaceable: String
§details: Vec<GetTransactionDetail>
§hex: Transaction
The transaction itself.
Implementations§
Source§impl GetTransaction
impl GetTransaction
pub fn block_height(&self) -> u64
Trait Implementations§
Source§impl Clone for GetTransaction
impl Clone for GetTransaction
Source§fn clone(&self) -> GetTransaction
fn clone(&self) -> GetTransaction
Returns a duplicate 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 Debug for GetTransaction
impl Debug for GetTransaction
Source§impl<'de> Deserialize<'de> for GetTransaction
impl<'de> Deserialize<'de> for GetTransaction
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 PartialEq for GetTransaction
impl PartialEq for GetTransaction
impl StructuralPartialEq for GetTransaction
Auto Trait Implementations§
impl Freeze for GetTransaction
impl RefUnwindSafe for GetTransaction
impl Send for GetTransaction
impl Sync for GetTransaction
impl Unpin for GetTransaction
impl UnwindSafe for GetTransaction
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