pub struct ShortId(_);
Expand description
Short transaction IDs are used to represent a transaction without sending a full 256-bit hash.
Implementations
sourceimpl ShortId
impl ShortId
sourceimpl ShortId
impl ShortId
sourcepub fn calculate_siphash_keys(header: &BlockHeader, nonce: u64) -> (u64, u64)
pub fn calculate_siphash_keys(header: &BlockHeader, nonce: u64) -> (u64, u64)
Calculate the SipHash24 keys used to calculate short IDs.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for ShortId
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for ShortId
Available on crate feature
serde
only.sourcefn deserialize<D: Deserializer<'de>>(d: D) -> Result<ShortId, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<ShortId, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromHex for ShortId
impl FromHex for ShortId
sourcefn from_byte_iter<I>(iter: I) -> Result<Self, Error>where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_byte_iter<I>(iter: I) -> Result<Self, Error>where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
Produces an object from a byte iterator.
sourceimpl Ord for ShortId
impl Ord for ShortId
1.21.0 · sourceconst fn max(self, other: Self) -> Selfwhere
Self: Sized,
const fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Selfwhere
Self: Sized,
const fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<ShortId> for ShortId
impl PartialOrd<ShortId> for ShortId
sourcefn partial_cmp(&self, other: &ShortId) -> Option<Ordering>
fn partial_cmp(&self, other: &ShortId) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ShortId
impl Eq for ShortId
impl StructuralEq for ShortId
impl StructuralPartialEq for ShortId
Auto Trait Implementations
impl RefUnwindSafe for ShortId
impl Send for ShortId
impl Sync for ShortId
impl Unpin for ShortId
impl UnwindSafe for ShortId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more