pub struct CheckpointResponse {
pub sequence_number: CheckpointSequenceNumber,
pub summary: Option<CheckpointSummary>,
pub signature: Option<ValidatorAggregatedSignature>,
pub contents: Option<CheckpointContents>,
pub executed_transactions: Vec<ExecutedTransaction>,
pub events: Vec<Event>,
}Expand description
Response for a checkpoint query.
Contains checkpoint summary, signature, contents, transactions, and events.
Fields are proto types that can be accessed directly or converted to SDK
types using their conversion methods (e.g.,
response.summary()?.summary()?, response.contents()?.contents()?).
Fields§
§sequence_number: CheckpointSequenceNumberThe checkpoint sequence number.
summary: Option<CheckpointSummary>Proto checkpoint summary. Use response.summary()?.summary() to convert
to SDK type.
signature: Option<ValidatorAggregatedSignature>Proto validator signature. Use response.signature()?.signature() to
convert to SDK type.
contents: Option<CheckpointContents>Proto checkpoint contents. Use response.contents()?.contents() to
convert to SDK type.
executed_transactions: Vec<ExecutedTransaction>Proto executed transactions. Use methods like tx.effects()?,
tx.transaction()?, etc.
events: Vec<Event>Proto events. Use event.try_into() or event.events() to convert to
SDK types.
Implementations§
Source§impl CheckpointResponse
impl CheckpointResponse
Sourcepub fn sequence_number(&self) -> CheckpointSequenceNumber
pub fn sequence_number(&self) -> CheckpointSequenceNumber
Get the checkpoint sequence number.
Always available regardless of the read mask.
Sourcepub fn summary(&self) -> Result<&CheckpointSummary>
pub fn summary(&self) -> Result<&CheckpointSummary>
Get the checkpoint summary.
Returns the proto
CheckpointSummary
which provides:
Read mask: "checkpoint.summary" (see
CHECKPOINT_RESPONSE_SUMMARY)
Sourcepub fn signed_summary(&self) -> Result<SignedCheckpointSummary>
pub fn signed_summary(&self) -> Result<SignedCheckpointSummary>
Build a SignedCheckpointSummary
from the response.
Requires the checkpoint summary and signature to be present.
Read mask: see CHECKPOINT_RESPONSE_SIGNED_SUMMARY
Sourcepub fn signature(&self) -> Result<&ValidatorAggregatedSignature>
pub fn signature(&self) -> Result<&ValidatorAggregatedSignature>
Get the validator aggregated signature for the checkpoint.
Read mask: "checkpoint.signature" (see
CHECKPOINT_RESPONSE_SIGNATURE)
Sourcepub fn contents(&self) -> Result<&CheckpointContents>
pub fn contents(&self) -> Result<&CheckpointContents>
Get the checkpoint contents.
Returns the proto
CheckpointContents
which provides:
digest()— the contents digestcontents()— the deserialized SDKCheckpointContents
Read mask: "checkpoint.contents" (see
CHECKPOINT_RESPONSE_CONTENTS)
Sourcepub fn executed_transactions(&self) -> &Vec<ExecutedTransaction>
pub fn executed_transactions(&self) -> &Vec<ExecutedTransaction>
Get the executed transactions in this checkpoint.
Returns proto
ExecutedTransaction
values. Which sub-fields are populated depends on the read mask; use
paths like "transactions.effects" or "transactions.transaction".
Read mask: "transactions" for all sub-fields (see
CHECKPOINT_RESPONSE_EXECUTED_TRANSACTIONS)
Sourcepub fn events(&self) -> &Vec<Event>
pub fn events(&self) -> &Vec<Event>
Get the top-level events for this checkpoint.
Returns proto Event values.
Which sub-fields are populated depends on the read mask; use paths like
"events.bcs" or "events.event_type".
Read mask: "events" for all sub-fields (see
CHECKPOINT_RESPONSE_EVENTS)
Sourcepub fn checkpoint_data(&self) -> Result<CheckpointData>
pub fn checkpoint_data(&self) -> Result<CheckpointData>
Build a full
CheckpointData
from the response.
Requires the checkpoint summary, signature, contents, and all transaction data (transaction, signatures, effects, events, input_objects, output_objects) to be present in the response.
Read mask: see CHECKPOINT_RESPONSE_CHECKPOINT_DATA
§Example
use iota_grpc_client::CHECKPOINT_RESPONSE_CHECKPOINT_DATA;
let client = Client::connect("http://localhost:9000").await?;
let cp = client
.get_checkpoint_latest(Some(CHECKPOINT_RESPONSE_CHECKPOINT_DATA), None, None)
.await?;
let data = cp.body().checkpoint_data()?;Trait Implementations§
Source§impl Clone for CheckpointResponse
impl Clone for CheckpointResponse
Source§fn clone(&self) -> CheckpointResponse
fn clone(&self) -> CheckpointResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !Freeze for CheckpointResponse
impl RefUnwindSafe for CheckpointResponse
impl Send for CheckpointResponse
impl Sync for CheckpointResponse
impl Unpin for CheckpointResponse
impl UnwindSafe for CheckpointResponse
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.