pub struct ShortOutPoint(pub Vec<u8>);
Expand description
Shortened OutPoint
to save memory
Tuple Fields§
§0: Vec<u8>
Implementations§
source§impl ShortOutPoint
impl ShortOutPoint
sourcepub fn new(outpoint: &OutPoint) -> ShortOutPoint
pub fn new(outpoint: &OutPoint) -> ShortOutPoint
Shorten an existing OutPoint
- 2 bytes represent far more than the maximum tx outputs (2^16)
- 12 byte subset of the txid is unlikely to generate collisions even with 1 billion txs (~6.3e-12)
Trait Implementations§
source§impl Clone for ShortOutPoint
impl Clone for ShortOutPoint
source§fn clone(&self) -> ShortOutPoint
fn clone(&self) -> ShortOutPoint
Returns a copy 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 ShortOutPoint
impl Debug for ShortOutPoint
source§impl Hash for ShortOutPoint
impl Hash for ShortOutPoint
source§impl PartialEq for ShortOutPoint
impl PartialEq for ShortOutPoint
impl Eq for ShortOutPoint
impl StructuralPartialEq for ShortOutPoint
Auto Trait Implementations§
impl Freeze for ShortOutPoint
impl RefUnwindSafe for ShortOutPoint
impl Send for ShortOutPoint
impl Sync for ShortOutPoint
impl Unpin for ShortOutPoint
impl UnwindSafe for ShortOutPoint
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
)