pub trait OutputInterface: Sized {
type KeyId;
type Input: Clone + Debug + PartialEq + Eq + PartialOrd + Ord;
const POOL_TYPE: PoolType;
// Required methods
fn output_id(&self) -> OutputId;
fn key_id(&self) -> Self::KeyId;
fn spending_transaction(&self) -> Option<TxId>;
fn set_spending_transaction(&mut self, spending_transaction: Option<TxId>);
fn value(&self) -> u64;
fn spend_link(&self) -> Option<Self::Input>;
fn transaction_inputs(transaction: &WalletTransaction) -> Vec<&Self::Input>;
fn transaction_outputs(transaction: &WalletTransaction) -> &[Self];
}Expand description
Provides a common API for all output types.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn spending_transaction(&self) -> Option<TxId>
fn spending_transaction(&self) -> Option<TxId>
Transaction ID of transaction this output was spent.
If None, output is not spent.
Sourcefn set_spending_transaction(&mut self, spending_transaction: Option<TxId>)
fn set_spending_transaction(&mut self, spending_transaction: Option<TxId>)
Sets spending transaction.
Sourcefn spend_link(&self) -> Option<Self::Input>
fn spend_link(&self) -> Option<Self::Input>
Returns the type used to link with transaction inputs for spend detection.
Returns None in the case the nullifier is not available for shielded outputs.
Nullifier for shielded outputs. Outpoint for transparent outputs.
Sourcefn transaction_inputs(transaction: &WalletTransaction) -> Vec<&Self::Input>
fn transaction_inputs(transaction: &WalletTransaction) -> Vec<&Self::Input>
Inputs within transaction used to detect an output’s spend status.
Nullifiers for shielded outputs. Out points for transparent outputs.
Sourcefn transaction_outputs(transaction: &WalletTransaction) -> &[Self]
fn transaction_outputs(transaction: &WalletTransaction) -> &[Self]
Outputs within transaction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.