pub struct ChainTxStats {
pub time: i64,
pub tx_count: i64,
pub window_final_block_hash: String,
pub window_final_block_height: i64,
pub window_block_count: i64,
pub window_tx_count: Option<i64>,
pub window_interval: Option<i64>,
pub tx_rate: Option<f64>,
}Expand description
Custom type for getchaintxstats that fixes tx_rate from Option<i64> to Option<f64>.
Bitcoin Core returns txrate as a floating-point number (e.g. 4.56)
but the upstream corepc-types crate incorrectly declares the field as Option<i64>,
which causes deserialization to fail.
Fields§
§time: i64§tx_count: i64§window_final_block_hash: String§window_final_block_height: i64§window_block_count: i64§window_tx_count: Option<i64>§window_interval: Option<i64>§tx_rate: Option<f64>Trait Implementations§
Source§impl Clone for ChainTxStats
impl Clone for ChainTxStats
Source§fn clone(&self) -> ChainTxStats
fn clone(&self) -> ChainTxStats
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 ChainTxStats
impl Debug for ChainTxStats
Source§impl<'de> Deserialize<'de> for ChainTxStats
impl<'de> Deserialize<'de> for ChainTxStats
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
Auto Trait Implementations§
impl Freeze for ChainTxStats
impl RefUnwindSafe for ChainTxStats
impl Send for ChainTxStats
impl Sync for ChainTxStats
impl Unpin for ChainTxStats
impl UnsafeUnpin for ChainTxStats
impl UnwindSafe for ChainTxStats
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