pub struct WitnessPos { /* private fields */ }Implementations§
Source§impl WitnessPos
impl WitnessPos
Sourcepub fn layer1(&self) -> Layer1
pub fn layer1(&self) -> Layer1
Method returning copy of WitnessPos::layer1 field.
Sourcepub fn height(&self) -> NonZero<u32>
pub fn height(&self) -> NonZero<u32>
Method returning copy of WitnessPos::height field.
Sourcepub fn timestamp(&self) -> i64
pub fn timestamp(&self) -> i64
Method returning copy of WitnessPos::timestamp field.
Source§impl WitnessPos
impl WitnessPos
pub fn new(height: NonZero<u32>, timestamp: i64) -> Option<WitnessPos>
👎Deprecated since 0.11.0-beta.9: please use
WitnessPos::bitcoin or WitnessPos::liquid insteadpub fn bitcoin(height: NonZero<u32>, timestamp: i64) -> Option<WitnessPos>
pub fn liquid(height: NonZero<u32>, timestamp: i64) -> Option<WitnessPos>
Trait Implementations§
Source§impl Clone for WitnessPos
impl Clone for WitnessPos
Source§fn clone(&self) -> WitnessPos
fn clone(&self) -> WitnessPos
Returns a duplicate 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 WitnessPos
impl Debug for WitnessPos
Source§impl<'de> Deserialize<'de> for WitnessPos
impl<'de> Deserialize<'de> for WitnessPos
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WitnessPos, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WitnessPos, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for WitnessPos
impl Display for WitnessPos
Source§impl From<WitnessPos> for WitnessOrd
impl From<WitnessPos> for WitnessOrd
Source§fn from(v: WitnessPos) -> WitnessOrd
fn from(v: WitnessPos) -> WitnessOrd
Converts to this type from the input type.
Source§impl Hash for WitnessPos
impl Hash for WitnessPos
Source§impl Ord for WitnessPos
impl Ord for WitnessPos
Source§fn cmp(&self, other: &WitnessPos) -> Ordering
fn cmp(&self, other: &WitnessPos) -> Ordering
Since we support multiple layer 1, we have to order basing on the timestamp information and not height. The timestamp data are consistent across multiple blockchains, while height evolves with a different speed and can’t be used in comparisons.
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 WitnessPos
impl PartialEq for WitnessPos
Source§impl PartialOrd for WitnessPos
impl PartialOrd for WitnessPos
Source§impl Serialize for WitnessPos
impl Serialize for WitnessPos
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
Source§impl StrictDecode for WitnessPos
impl StrictDecode for WitnessPos
fn strict_decode(reader: &mut impl TypedRead) -> Result<WitnessPos, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for WitnessPos
impl StrictDumb for WitnessPos
fn strict_dumb() -> WitnessPos
Source§impl StrictEncode for WitnessPos
impl StrictEncode for WitnessPos
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for WitnessPos
impl StrictStruct for WitnessPos
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for WitnessPos
impl StrictType for WitnessPos
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_LOGIC
fn strict_name() -> Option<TypeName>
impl Copy for WitnessPos
impl Eq for WitnessPos
impl StrictProduct for WitnessPos
impl StructuralPartialEq for WitnessPos
Auto Trait Implementations§
impl Freeze for WitnessPos
impl RefUnwindSafe for WitnessPos
impl Send for WitnessPos
impl Sync for WitnessPos
impl Unpin for WitnessPos
impl UnwindSafe for WitnessPos
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.