Skip to main content

BundleView

Trait BundleView 

Source
pub trait BundleView<NoteRef> {
    type In: InputView<NoteRef>;
    type Out: OutputView;

    // Required methods
    fn bundle_version(&self) -> BundleVersion;
    fn inputs(&self) -> &[Self::In];
    fn outputs(&self) -> &[Self::Out];
}
Available on crate feature orchard only.
Expand description

A trait that provides a minimized view of Orchard-style bundle configuration suitable for use in fee and change calculation.

Required Associated Types§

Source

type In: InputView<NoteRef>

The type of inputs to the bundle.

Source

type Out: OutputView

The type of inputs of the bundle.

Required Methods§

Source

fn bundle_version(&self) -> BundleVersion

Returns the bundle version for the bundle.

Source

fn inputs(&self) -> &[Self::In]

Returns the inputs to the bundle.

Source

fn outputs(&self) -> &[Self::Out]

Returns the outputs of the bundle.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, NoteRef, In: InputView<NoteRef>, Out: OutputView> BundleView<NoteRef> for (BundleVersion, &'a [In], &'a [Out])

Source§

type In = In

Source§

type Out = Out

Source§

fn bundle_version(&self) -> BundleVersion

Source§

fn inputs(&self) -> &[In]

Source§

fn outputs(&self) -> &[Out]

Implementors§

Source§

impl<NoteRef> BundleView<NoteRef> for EmptyBundleView

Source§

type In = !

Source§

type Out = !