pub enum Prevouts<'u, T>where
T: 'u + Borrow<TxOut>,{
One(usize, T),
All(&'u [T]),
}
Expand description
Contains outputs of previous transactions. In the case SchnorrSighashType
variant is
SIGHASH_ANYONECANPAY
, Prevouts::One
may be used.
Variants§
One(usize, T)
One
variant allows provision of the single prevout needed. It’s useful, for example, when
modifier SIGHASH_ANYONECANPAY
is provided, only prevout of the current input is needed.
The first usize
argument is the input index this TxOut
is referring to.
All(&'u [T])
When SIGHASH_ANYONECANPAY
is not provided, or when the caller is giving all prevouts so
the same variable can be used for multiple inputs.
Trait Implementations§
source§impl<'u, T> Ord for Prevouts<'u, T>where
T: 'u + Borrow<TxOut> + Ord,
impl<'u, T> Ord for Prevouts<'u, T>where T: 'u + Borrow<TxOut> + Ord,
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<'u, T> PartialEq<Prevouts<'u, T>> for Prevouts<'u, T>where
T: 'u + Borrow<TxOut> + PartialEq,
impl<'u, T> PartialEq<Prevouts<'u, T>> for Prevouts<'u, T>where T: 'u + Borrow<TxOut> + PartialEq,
source§impl<'u, T> PartialOrd<Prevouts<'u, T>> for Prevouts<'u, T>where
T: 'u + Borrow<TxOut> + PartialOrd,
impl<'u, T> PartialOrd<Prevouts<'u, T>> for Prevouts<'u, T>where T: 'u + Borrow<TxOut> + PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
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<'u, T> Eq for Prevouts<'u, T>where T: 'u + Borrow<TxOut> + Eq,
impl<'u, T> StructuralEq for Prevouts<'u, T>where T: 'u + Borrow<TxOut>,
impl<'u, T> StructuralPartialEq for Prevouts<'u, T>where T: 'u + Borrow<TxOut>,
Auto Trait Implementations§
impl<'u, T> RefUnwindSafe for Prevouts<'u, T>where T: RefUnwindSafe,
impl<'u, T> Send for Prevouts<'u, T>where T: Send + Sync,
impl<'u, T> Sync for Prevouts<'u, T>where T: Sync,
impl<'u, T> Unpin for Prevouts<'u, T>where T: Unpin,
impl<'u, T> UnwindSafe for Prevouts<'u, T>where T: UnwindSafe + RefUnwindSafe,
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