pub struct SeqNo(/* private fields */);
Implementations§
source§impl SeqNo
impl SeqNo
pub const fn from_consensus_u32(lock_time: u32) -> SeqNo
pub const fn to_consensus_u32(&self) -> u32
sourcepub const fn from_height(blocks: u16) -> SeqNo
pub const fn from_height(blocks: u16) -> SeqNo
Creates relative time lock measured in number of blocks (implies RBF).
sourcepub const fn from_intervals(intervals: u16) -> SeqNo
pub const fn from_intervals(intervals: u16) -> SeqNo
Creates relative time lock measured in number of 512-second intervals (implies RBF).
sourcepub const fn time_lock_interval(self) -> Option<TimeLockInterval>
pub const fn time_lock_interval(self) -> Option<TimeLockInterval>
Gets structured relative time lock information from the nSeq
value.
See [TimeLockInterval
].
pub const fn is_timelock(self) -> bool
Trait Implementations§
source§impl ConsensusDecode for SeqNo
impl ConsensusDecode for SeqNo
fn consensus_decode( reader: &mut impl Read ) -> Result<SeqNo, ConsensusDecodeError>
fn consensus_deserialize( bytes: impl AsRef<[u8]> ) -> Result<Self, ConsensusDecodeError>
source§impl ConsensusEncode for SeqNo
impl ConsensusEncode for SeqNo
source§impl PartialEq for SeqNo
impl PartialEq for SeqNo
source§impl StrictDecode for SeqNo
impl StrictDecode for SeqNo
fn strict_decode(reader: &mut impl TypedRead) -> Result<SeqNo, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictType for SeqNo
impl StrictType for SeqNo
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Copy for SeqNo
impl Eq for SeqNo
impl StrictProduct for SeqNo
impl StructuralEq for SeqNo
impl StructuralPartialEq for SeqNo
Auto Trait Implementations§
impl RefUnwindSafe for SeqNo
impl Send for SeqNo
impl Sync for SeqNo
impl Unpin for SeqNo
impl UnwindSafe for SeqNo
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.