pub struct SeqNo(/* private fields */);
Implementations§
Source§impl SeqNo
impl SeqNo
pub const ZERO: 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 StrictDecode for SeqNo
impl StrictDecode for SeqNo
fn strict_decode(reader: &mut impl TypedRead) -> Result<SeqNo, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for SeqNo
impl StrictDumb for SeqNo
fn strict_dumb() -> SeqNo
Source§impl StrictEncode for SeqNo
impl StrictEncode for SeqNo
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictTuple for SeqNo
impl StrictTuple for SeqNo
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
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 StructuralPartialEq for SeqNo
Auto Trait Implementations§
impl Freeze for SeqNo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.