pub struct TransactionBody {Show 20 fields
pub inputs: Set<TransactionInput>,
pub outputs: Vec<MemoizedTransactionOutput>,
pub fee: Lovelace,
pub validity_interval_end: Option<u64>,
pub certificates: Option<NonEmptySet<Certificate>>,
pub withdrawals: Option<NonEmptyKeyValuePairs<RewardAccount, Lovelace>>,
pub auxiliary_data_hash: Option<Bytes>,
pub validity_interval_start: Option<u64>,
pub mint: Option<NonEmptyKeyValuePairs<Hash<CREDENTIAL>, NonEmptyKeyValuePairs<AssetName, NonZeroInt>>>,
pub script_data_hash: Option<Hash<32>>,
pub collateral: Option<NonEmptySet<TransactionInput>>,
pub required_signers: Option<NonEmptySet<Hash<KEY>>>,
pub network_id: Option<NetworkId>,
pub collateral_return: Option<MemoizedTransactionOutput>,
pub total_collateral: Option<Lovelace>,
pub reference_inputs: Option<NonEmptySet<TransactionInput>>,
pub votes: Option<NonEmptyKeyValuePairs<Voter, NonEmptyKeyValuePairs<ProposalId, VotingProcedure>>>,
pub proposals: Option<NonEmptySet<Proposal>>,
pub treasury_value: Option<Lovelace>,
pub donation: Option<PositiveCoin>,
/* private fields */
}Expand description
A multi-era transaction body. This type is meant to represent all transaction body in eras that we may encounter.
Fields§
§inputs: Set<TransactionInput>§outputs: Vec<MemoizedTransactionOutput>§fee: Lovelace§validity_interval_end: Option<u64>§certificates: Option<NonEmptySet<Certificate>>§withdrawals: Option<NonEmptyKeyValuePairs<RewardAccount, Lovelace>>§auxiliary_data_hash: Option<Bytes>§validity_interval_start: Option<u64>§mint: Option<NonEmptyKeyValuePairs<Hash<CREDENTIAL>, NonEmptyKeyValuePairs<AssetName, NonZeroInt>>>§script_data_hash: Option<Hash<32>>§collateral: Option<NonEmptySet<TransactionInput>>§required_signers: Option<NonEmptySet<Hash<KEY>>>§network_id: Option<NetworkId>§collateral_return: Option<MemoizedTransactionOutput>§total_collateral: Option<Lovelace>§reference_inputs: Option<NonEmptySet<TransactionInput>>§votes: Option<NonEmptyKeyValuePairs<Voter, NonEmptyKeyValuePairs<ProposalId, VotingProcedure>>>§proposals: Option<NonEmptySet<Proposal>>§treasury_value: Option<Lovelace>§donation: Option<PositiveCoin>Implementations§
Source§impl TransactionBody
impl TransactionBody
pub const HASH_SIZE: usize = 32
Sourcepub fn id(&self) -> Hash<{ Self::HASH_SIZE }>
pub fn id(&self) -> Hash<{ Self::HASH_SIZE }>
The original id (i.e. blake2b-256 hash digest) of the transaction body. Note that the hash computed from the original bytes and memoized; it is not re-computed from re-serialised data.
pub fn len(&self) -> u64
Trait Implementations§
Source§impl Clone for TransactionBody
impl Clone for TransactionBody
Source§fn clone(&self) -> TransactionBody
fn clone(&self) -> TransactionBody
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 TransactionBody
impl Debug for TransactionBody
Source§impl<'b, C> Decode<'b, C> for TransactionBody
impl<'b, C> Decode<'b, C> for TransactionBody
Source§impl Default for TransactionBody
impl Default for TransactionBody
Source§impl<'de> Deserialize<'de> for TransactionBody
impl<'de> Deserialize<'de> for TransactionBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Ctx> Encode<Ctx> for TransactionBody
impl<Ctx> Encode<Ctx> for TransactionBody
Source§impl PartialEq for TransactionBody
impl PartialEq for TransactionBody
Source§impl Serialize for TransactionBody
impl Serialize for TransactionBody
impl Eq for TransactionBody
impl StructuralPartialEq for TransactionBody
Auto Trait Implementations§
impl Freeze for TransactionBody
impl RefUnwindSafe for TransactionBody
impl Send for TransactionBody
impl Sync for TransactionBody
impl Unpin for TransactionBody
impl UnsafeUnpin for TransactionBody
impl UnwindSafe for TransactionBody
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<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