Struct ckb_types::packed::Transaction
source · pub struct Transaction(_);
Implementations§
source§impl 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>
source§impl 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.
source§impl 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.
source§impl 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()
.
source§impl Transaction
impl Transaction
sourcepub fn calc_witness_hash(&self) -> Byte32
pub fn calc_witness_hash(&self) -> Byte32
source§impl Transaction
impl Transaction
sourcepub fn serialized_size_in_block(&self) -> usize
pub fn serialized_size_in_block(&self) -> usize
source§impl 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§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Transaction
impl Debug for Transaction
source§impl Default for Transaction
impl Default for Transaction
source§impl Display for Transaction
impl Display for Transaction
source§impl 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] ⓘ
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> PackVec<TransactionVec, Transaction> for Twhere
T: IntoIterator<Item = Transaction>,
impl<T> PackVec<TransactionVec, Transaction> for Twhere T: IntoIterator<Item = Transaction>,
source§fn pack(self) -> TransactionVec
fn pack(self) -> TransactionVec
Packs a vector of binary data into one binary data.