Enum bdk_chain::ConfirmationTime
source · pub enum ConfirmationTime {
Confirmed {
height: u32,
time: u64,
},
Unconfirmed {
last_seen: u64,
},
}
Expand description
Block height and timestamp at which a transaction is confirmed.
Variants§
Implementations§
source§impl ConfirmationTime
impl ConfirmationTime
sourcepub fn unconfirmed(last_seen: u64) -> Self
pub fn unconfirmed(last_seen: u64) -> Self
Construct an unconfirmed variant using the given last_seen
time in unix seconds.
sourcepub fn is_confirmed(&self) -> bool
pub fn is_confirmed(&self) -> bool
Returns whether ConfirmationTime
is the confirmed variant.
Trait Implementations§
source§impl Clone for ConfirmationTime
impl Clone for ConfirmationTime
source§fn clone(&self) -> ConfirmationTime
fn clone(&self) -> ConfirmationTime
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 Debug for ConfirmationTime
impl Debug for ConfirmationTime
source§impl<'de> Deserialize<'de> for ConfirmationTime
impl<'de> Deserialize<'de> for ConfirmationTime
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 From<ChainPosition<ConfirmationTimeHeightAnchor>> for ConfirmationTime
impl From<ChainPosition<ConfirmationTimeHeightAnchor>> for ConfirmationTime
source§fn from(observed_as: ChainPosition<ConfirmationTimeHeightAnchor>) -> Self
fn from(observed_as: ChainPosition<ConfirmationTimeHeightAnchor>) -> Self
Converts to this type from the input type.
source§impl Hash for ConfirmationTime
impl Hash for ConfirmationTime
source§impl Ord for ConfirmationTime
impl Ord for ConfirmationTime
source§fn cmp(&self, other: &ConfirmationTime) -> Ordering
fn cmp(&self, other: &ConfirmationTime) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ConfirmationTime> for ConfirmationTime
impl PartialEq<ConfirmationTime> for ConfirmationTime
source§fn eq(&self, other: &ConfirmationTime) -> bool
fn eq(&self, other: &ConfirmationTime) -> bool
source§impl PartialOrd<ConfirmationTime> for ConfirmationTime
impl PartialOrd<ConfirmationTime> for ConfirmationTime
source§fn partial_cmp(&self, other: &ConfirmationTime) -> Option<Ordering>
fn partial_cmp(&self, other: &ConfirmationTime) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more