Struct ckb_types::core::TransactionView[][src]

pub struct TransactionView { /* fields omitted */ }

A readonly and immutable struct which includes Transaction and its associated hashes.

Notice

This struct is not implement the trait Default, use TransactionBuilder to construct it.

Implementations

impl TransactionView[src]

pub fn as_advanced_builder(&self) -> TransactionBuilder[src]

Creates an advanced builder base on current data.

impl TransactionView[src]

pub fn data(&self) -> Transaction[src]

Gets a clone of packed::Transaction.

pub fn hash(&self) -> Byte32[src]

Gets a clone of hash.

pub fn witness_hash(&self) -> Byte32[src]

Gets a clone of witness_hash.

pub fn version(&self) -> Version[src]

Gets raw.version.

pub fn cell_deps(&self) -> CellDepVec[src]

Gets raw.cell_deps.

pub fn header_deps(&self) -> Byte32Vec[src]

Gets raw.header_deps.

pub fn inputs(&self) -> CellInputVec[src]

Gets raw.inputs.

pub fn outputs(&self) -> CellOutputVec[src]

Gets raw.outputs.

pub fn outputs_data(&self) -> BytesVec[src]

Gets raw.outputs_data.

pub fn witnesses(&self) -> BytesVec[src]

Gets witnesses.

pub fn output(&self, idx: usize) -> Option<CellOutput>[src]

Gets an output through its index.

pub fn output_with_data(&self, idx: usize) -> Option<(CellOutput, Bytes)>[src]

Gets an output and its data through its index.

pub fn output_pts(&self) -> Vec<OutPoint>[src]

Gets out points for all outputs.

pub fn output_pts_iter(&self) -> impl Iterator<Item = OutPoint>[src]

Creates an iterator from out points of all outputs.

pub fn input_pts_iter(&self) -> impl Iterator<Item = OutPoint>[src]

Creates an iterator from out points of all inputs.

pub fn outputs_with_data_iter(
    &self
) -> impl Iterator<Item = (CellOutput, Bytes)>
[src]

Creates an iterator from all outputs and their data.

pub fn cell_deps_iter(&self) -> impl Iterator<Item = CellDep>[src]

Creates an iterator from raw.cell_deps.

pub fn header_deps_iter(&self) -> impl Iterator<Item = Byte32>[src]

Creates an iterator from raw.header_deps.

pub fn fake_hash(self, hash: Byte32) -> Self[src]

Sets a fake transacton hash.

pub fn fake_witness_hash(self, witness_hash: Byte32) -> Self[src]

Sets a fake witness hash.

pub fn outputs_capacity(&self) -> CapacityResult<Capacity>[src]

Sums the capacities of all outputs.

pub fn is_cellbase(&self) -> bool[src]

Checks whether the transaction is a cellbase.

pub fn proposal_short_id(&self) -> ProposalShortId[src]

Creates a new ProposalShortId from the transaction hash.

Trait Implementations

impl Clone for TransactionView[src]

impl Debug for TransactionView[src]

impl Display for TransactionView[src]

impl Eq for TransactionView[src]

impl Hash for TransactionView[src]

impl Pack<TransactionView> for TransactionView[src]

impl PartialEq<TransactionView> for TransactionView[src]

impl<'r> Unpack<TransactionView> for TransactionViewReader<'r>[src]

impl Unpack<TransactionView> for TransactionView[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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