#[non_exhaustive]pub enum CheckpointContents {
V1(CheckpointContentsV1),
}Expand description
The committed to contents of a checkpoint.
CheckpointContents contains a list of digests of Transactions, their
effects, and the user signatures that authorized their execution included in
a checkpoint.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-contents = %d00 checkpoint-contents-v1 ; variant 0Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Implementations§
Source§impl CheckpointContents
impl CheckpointContents
pub fn digest(&self) -> CheckpointContentsDigest
hash and serde only.Source§impl CheckpointContents
impl CheckpointContents
pub fn new_v1(contents: CheckpointContentsV1) -> Self
Sourcepub fn as_v1(&self) -> &CheckpointContentsV1
pub fn as_v1(&self) -> &CheckpointContentsV1
Converts this into a v1 if it is a v1 variant, or panics otherwise.
Sourcepub fn as_mut_v1(&mut self) -> &mut CheckpointContentsV1
pub fn as_mut_v1(&mut self) -> &mut CheckpointContentsV1
Converts this into a mut v1 if it is a v1 variant, or panics otherwise.
Sourcepub fn as_opt_v1(&self) -> Option<&CheckpointContentsV1>
pub fn as_opt_v1(&self) -> Option<&CheckpointContentsV1>
Converts this into a v1 if it is a v1 variant, or returns None otherwise.
Sourcepub fn as_opt_mut_v1(&mut self) -> Option<&mut CheckpointContentsV1>
pub fn as_opt_mut_v1(&mut self) -> Option<&mut CheckpointContentsV1>
Converts this into a mut v1 if it is a v1 variant, or returns None otherwise.
Sourcepub fn into_opt_v1(self) -> Option<CheckpointContentsV1>
pub fn into_opt_v1(self) -> Option<CheckpointContentsV1>
Converts this into a v1 if it is a v1 variant, or returns None otherwise.
Sourcepub fn into_v1(self) -> CheckpointContentsV1
pub fn into_v1(self) -> CheckpointContentsV1
Converts this into a v1 if it is a v1 variant, or panics otherwise.
Sourcepub fn transactions(&self) -> &[CheckpointTransactionInfo]
pub fn transactions(&self) -> &[CheckpointTransactionInfo]
Returns a reference to the list of transactions in this checkpoint.
Sourcepub fn into_transactions(self) -> Vec<CheckpointTransactionInfo>
pub fn into_transactions(self) -> Vec<CheckpointTransactionInfo>
Consumes the CheckpointContentsV1 and returns the list of
transactions.
Trait Implementations§
Source§impl Arbitrary for CheckpointContents
Available on crate feature proptest only.
impl Arbitrary for CheckpointContents
proptest only.Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<CheckpointContents>
type Strategy = BoxedStrategy<CheckpointContents>
Strategy used to generate values of type Self.Source§fn arbitrary_with(
args_shared: <Self as Arbitrary>::Parameters,
) -> Self::Strategy
fn arbitrary_with( args_shared: <Self as Arbitrary>::Parameters, ) -> Self::Strategy
Source§impl Clone for CheckpointContents
impl Clone for CheckpointContents
Source§fn clone(&self) -> CheckpointContents
fn clone(&self) -> CheckpointContents
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckpointContents
impl Debug for CheckpointContents
Source§impl<'de> Deserialize<'de> for CheckpointContents
Available on crate feature serde only.
impl<'de> Deserialize<'de> for CheckpointContents
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for CheckpointContents
impl Display for CheckpointContents
impl Eq for CheckpointContents
Source§impl PartialEq for CheckpointContents
impl PartialEq for CheckpointContents
Source§impl Serialize for CheckpointContents
Available on crate feature serde only.
impl Serialize for CheckpointContents
serde only.