Struct ckb_types::core::TransactionView [−][src]
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]
&self
) -> impl Iterator<Item = (CellOutput, Bytes)>
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]
fn clone(&self) -> TransactionView
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TransactionView
[src]
impl Display for TransactionView
[src]
impl Eq for TransactionView
[src]
impl Hash for TransactionView
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Pack<TransactionView> for TransactionView
[src]
fn pack(&self) -> TransactionView
[src]
impl PartialEq<TransactionView> for TransactionView
[src]
impl<'r> Unpack<TransactionView> for TransactionViewReader<'r>
[src]
fn unpack(&self) -> TransactionView
[src]
impl Unpack<TransactionView> for TransactionView
[src]
fn unpack(&self) -> TransactionView
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransactionView
impl Send for TransactionView
impl Sync for TransactionView
impl Unpin for TransactionView
impl UnwindSafe for TransactionView
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,