pub struct Height(/* private fields */);
Expand description
A relative lock time lock-by-blockheight value.
Implementations§
Source§impl Height
impl Height
Sourcepub const MIN: Height = Self::ZERO
pub const MIN: Height = Self::ZERO
The minimum relative block height (0), can be included in any block.
Sourcepub const fn from_height(blocks: u16) -> Height
pub const fn from_height(blocks: u16) -> Height
Create a Height
using a count of blocks.
Sourcepub fn to_consensus_u32(&self) -> u32
pub fn to_consensus_u32(&self) -> u32
Returns the u32
value used to encode this locktime in an nSequence field or
argument to OP_CHECKSEQUENCEVERIFY
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Height
impl<'de> Deserialize<'de> for Height
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Height, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Height, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Height
impl Ord for Height
Source§impl PartialOrd for Height
impl PartialOrd for Height
Source§impl Serialize for Height
impl Serialize for Height
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)