Struct ckb_jsonrpc_types::TransactionTemplate [−][src]
pub struct TransactionTemplate { pub hash: H256, pub required: bool, pub cycles: Option<Cycle>, pub depends: Option<Vec<Uint64>>, pub data: Transaction, }
Expand description
Transaction template which is ready to be committed in the new block.
Fields
hash: H256
Transaction hash.
required: bool
Whether miner must include this transaction in the new block.
cycles: Option<Cycle>
The hint of how many cycles this transaction consumes.
Miners can utilize this field to ensure that the total cycles do not exceed the limit while selecting transactions.
depends: Option<Vec<Uint64>>
Transaction dependencies.
This is a hint to help miners selecting transactions.
This transaction can only be committed if its dependencies are also committed in the new block.
This field is a list of indices into the array transactions
in the block template.
For example, depends = [1, 2]
means this transaction depends on
block_template.transactions[1]
and block_template.transactions[2]
.
data: Transaction
The transaction.
Miners must keep it unchanged when including it in the new block.
Trait Implementations
impl Clone for TransactionTemplate
[src]
impl Clone for TransactionTemplate
[src]fn clone(&self) -> TransactionTemplate
[src]
fn clone(&self) -> TransactionTemplate
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for TransactionTemplate
[src]
impl Debug for TransactionTemplate
[src]impl Default for TransactionTemplate
[src]
impl Default for TransactionTemplate
[src]fn default() -> TransactionTemplate
[src]
fn default() -> TransactionTemplate
[src]Returns the “default value” for a type. Read more
impl<'de> Deserialize<'de> for TransactionTemplate
[src]
impl<'de> Deserialize<'de> for TransactionTemplate
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for TransactionTemplate
[src]
impl Hash for TransactionTemplate
[src]impl PartialEq<TransactionTemplate> for TransactionTemplate
[src]
impl PartialEq<TransactionTemplate> for TransactionTemplate
[src]fn eq(&self, other: &TransactionTemplate) -> bool
[src]
fn eq(&self, other: &TransactionTemplate) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &TransactionTemplate) -> bool
[src]
fn ne(&self, other: &TransactionTemplate) -> bool
[src]This method tests for !=
.
impl Serialize for TransactionTemplate
[src]
impl Serialize for TransactionTemplate
[src]impl Eq for TransactionTemplate
[src]
impl StructuralEq for TransactionTemplate
[src]
impl StructuralPartialEq for TransactionTemplate
[src]
Auto Trait Implementations
impl RefUnwindSafe for TransactionTemplate
impl Send for TransactionTemplate
impl Sync for TransactionTemplate
impl Unpin for TransactionTemplate
impl UnwindSafe for TransactionTemplate
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,