Struct ckb_types::packed::Transaction
source · [−]pub struct Transaction(_);
Implementations
sourceimpl Transaction
impl Transaction
pub const FIELD_COUNT: usize = 2usize
pub fn total_size(&self) -> usize
pub fn field_count(&self) -> usize
pub fn count_extra_fields(&self) -> usize
pub fn has_extra_fields(&self) -> bool
pub fn raw(&self) -> RawTransaction
pub fn witnesses(&self) -> BytesVec
pub fn as_reader<'r>(&'r self) -> TransactionReader<'r>
sourceimpl Transaction
impl Transaction
sourcepub fn as_advanced_builder(&self) -> TransactionBuilder
pub fn as_advanced_builder(&self) -> TransactionBuilder
Creates an advanced builder base on current data.
sourceimpl Transaction
impl Transaction
sourcepub fn into_view(self) -> TransactionView
pub fn into_view(self) -> TransactionView
Calculates the associated hashes and converts into TransactionView
with those hashes.
sourceimpl Transaction
impl Transaction
sourcepub fn calc_tx_hash(&self) -> Byte32
pub fn calc_tx_hash(&self) -> Byte32
Calls TransactionReader.calc_tx_hash()
for self.as_reader()
.
sourceimpl Transaction
impl Transaction
sourcepub fn calc_witness_hash(&self) -> Byte32
pub fn calc_witness_hash(&self) -> Byte32
sourceimpl Transaction
impl Transaction
sourcepub fn serialized_size_in_block(&self) -> usize
pub fn serialized_size_in_block(&self) -> usize
sourceimpl Transaction
impl Transaction
sourcepub fn is_cellbase(&self) -> bool
pub fn is_cellbase(&self) -> bool
Checks whether self is a cellbase.
sourcepub fn proposal_short_id(&self) -> ProposalShortId
pub fn proposal_short_id(&self) -> ProposalShortId
Generates a proposal short id after calculating the transaction hash.
Trait Implementations
sourceimpl Clone for Transaction
impl Clone for Transaction
sourcefn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Transaction
impl Debug for Transaction
sourceimpl Default for Transaction
impl Default for Transaction
sourceimpl Display for Transaction
impl Display for Transaction
sourceimpl Entity for Transaction
impl Entity for Transaction
type Builder = TransactionBuilder
const NAME: &'static str = "Transaction"
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn from_slice(slice: &[u8]) -> VerificationResult<Self>
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>
fn new_builder() -> Self::Builder
fn as_builder(self) -> Self::Builder
Auto Trait Implementations
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> PackVec<TransactionVec, Transaction> for T where
T: IntoIterator<Item = Transaction>,
impl<T> PackVec<TransactionVec, Transaction> for T where
T: IntoIterator<Item = Transaction>,
sourcefn pack(self) -> TransactionVec
fn pack(self) -> TransactionVec
Packs a vector of binary data into one binary data.