pub struct Transaction {
pub version: u64,
pub inputs: SmallVec<[TransactionInput; 2]>,
pub outputs: SmallVec<[TransactionOutput; 2]>,
pub lock_time: u64,
}Expand description
Transaction: ๐ฏ๐ณ = โ ร โ* ร ๐ฏ* ร โ
Performance optimization: Uses SmallVec for inputs/outputs to eliminate heap allocations for the common case of 1-2 inputs/outputs (80%+ of transactions).
Fieldsยง
ยงversion: u64ยงinputs: SmallVec<[TransactionInput; 2]>ยงoutputs: SmallVec<[TransactionOutput; 2]>ยงlock_time: u64Trait Implementationsยง
Sourceยงimpl Clone for Transaction
impl Clone for Transaction
Sourceยงfn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท 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 Transaction
impl Debug for Transaction
Sourceยงimpl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
Sourceยงfn deserialize<__D>(
__deserializer: __D,
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl PartialEq for Transaction
impl PartialEq for Transaction
Sourceยงfn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
Tests for
self and other values to be equal, and is used by ==.Sourceยงimpl Serialize for Transaction
impl Serialize for Transaction
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
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementationsยง
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnsafeUnpin for Transaction
impl UnwindSafe for Transaction
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ยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more