Struct Bundle

Source
pub struct Bundle { /* private fields */ }
Expand description

PCZT fields that are specific to producing the transaction’s transparent bundle (if any).

This struct is for representing Sapling in a partially-created transaction. If you have a fully-created transaction, use the regular Bundle struct.

Implementations§

Source§

impl Bundle

Source

pub fn parse( inputs: Vec<Input>, outputs: Vec<Output>, ) -> Result<Self, ParseError>

Parses a PCZT bundle from its component parts.

Source§

impl Bundle

Source

pub fn update_with<F>(&mut self, f: F) -> Result<(), UpdaterError>
where F: FnOnce(Updater<'_>) -> Result<(), UpdaterError>,

Updates the bundle with information provided in the given closure.

Source§

impl Bundle

Source

pub fn finalize_spends(&mut self) -> Result<(), SpendFinalizerError>

Finalizes the spends for this bundle.

Source§

impl Bundle

Source

pub fn extract_effects( &self, ) -> Result<Option<Bundle<EffectsOnly>>, TxExtractorError>

Extracts the effects of this PCZT bundle as a regular Bundle.

This is used by the Signer role to produce the transaction sighash.

Source

pub fn extract(self) -> Result<Option<Bundle<Unbound>>, TxExtractorError>

Extracts a fully authorized regular Bundle from this PCZT bundle.

This is used by the Transaction Extractor role to produce the final transaction.

Source§

impl Bundle

Source

pub fn inputs(&self) -> &Vec<Input>

The transparent inputs in this bundle.

Entries are added by the Constructor, and modified by an Updater, IO Finalizer, Signer, Combiner, or Spend Finalizer.

Source

pub fn outputs(&self) -> &Vec<Output>

The transparent outputs in this bundle.

Entries are added by the Constructor, and modified by an Updater, IO Finalizer, Signer, Combiner, or Spend Finalizer.

Source§

impl Bundle

Source

pub fn inputs_mut(&mut self) -> &mut [Input]

Returns a mutable reference to the inputs in this bundle.

This is used by Signers to apply signatures with Input::sign.

Trait Implementations§

Source§

impl Debug for Bundle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Bundle

§

impl RefUnwindSafe for Bundle

§

impl Send for Bundle

§

impl Sync for Bundle

§

impl Unpin for Bundle

§

impl UnwindSafe for Bundle

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V