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<ConfirmationBlockTime>> for ConfirmationTime
impl From<ChainPosition<ConfirmationBlockTime>> for ConfirmationTime
source§fn from(observed_as: ChainPosition<ConfirmationBlockTime>) -> Self
fn from(observed_as: ChainPosition<ConfirmationBlockTime>) -> 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 for ConfirmationTime
impl PartialEq for ConfirmationTime
source§fn eq(&self, other: &ConfirmationTime) -> bool
fn eq(&self, other: &ConfirmationTime) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ConfirmationTime
impl PartialOrd 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 moresource§impl Serialize for ConfirmationTime
impl Serialize for ConfirmationTime
impl Copy for ConfirmationTime
impl Eq for ConfirmationTime
impl StructuralPartialEq for ConfirmationTime
Auto Trait Implementations§
impl Freeze for ConfirmationTime
impl RefUnwindSafe for ConfirmationTime
impl Send for ConfirmationTime
impl Sync for ConfirmationTime
impl Unpin for ConfirmationTime
impl UnwindSafe for ConfirmationTime
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more