pub struct Height(/* private fields */);Expand description
An absolute block height, guaranteed to always contain a valid height value.
Implementations§
Source§impl Height
impl Height
Sourcepub fn to_consensus_u32(self) -> u32
pub fn to_consensus_u32(self) -> u32
Converts this Height to its inner u32 value.
§Examples
use elements::LockTime;
let n_lock_time: u32 = 741521;
let lock_time = LockTime::from_consensus(n_lock_time);
assert!(lock_time.is_block_height());
assert_eq!(lock_time.to_consensus_u32(), n_lock_time);Trait Implementations§
Source§impl Deserialize for Height
impl Deserialize for Height
Source§impl Ord for Height
impl Ord for Height
Source§impl PartialOrd for Height
impl PartialOrd for Height
impl Copy for Height
impl Eq for Height
impl StructuralPartialEq for Height
Auto Trait Implementations§
impl Freeze for Height
impl RefUnwindSafe for Height
impl Send for Height
impl Sync for Height
impl Unpin for Height
impl UnwindSafe for Height
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