pub trait MaybeConditionalTransaction {
// Required methods
fn set_conditional(&mut self, conditional: TransactionConditional);
fn conditional(&self) -> Option<&TransactionConditional>;
// Provided methods
fn has_exceeded_block_attributes(
&self,
block_attr: &BlockConditionalAttributes,
) -> bool { ... }
fn with_conditional(self, conditional: TransactionConditional) -> Self
where Self: Sized { ... }
}
Available on crate features
node-api
and node
only.Expand description
Helper trait that allows attaching a [TransactionConditional
].
Required Methods§
Sourcefn set_conditional(&mut self, conditional: TransactionConditional)
fn set_conditional(&mut self, conditional: TransactionConditional)
Attach a [TransactionConditional
].
Sourcefn conditional(&self) -> Option<&TransactionConditional>
fn conditional(&self) -> Option<&TransactionConditional>
Get attached [TransactionConditional
] if any.
Provided Methods§
Sourcefn has_exceeded_block_attributes(
&self,
block_attr: &BlockConditionalAttributes,
) -> bool
fn has_exceeded_block_attributes( &self, block_attr: &BlockConditionalAttributes, ) -> bool
Check if the conditional has exceeded the block attributes.
Sourcefn with_conditional(self, conditional: TransactionConditional) -> Selfwhere
Self: Sized,
fn with_conditional(self, conditional: TransactionConditional) -> Selfwhere
Self: Sized,
Helper that sets the conditional and returns the instance again