#[non_exhaustive]pub struct SourcePage {
pub archive_height: Option<u64>,
pub next_block: u64,
pub blocks: Vec<Block>,
pub logs: Vec<Log>,
pub rollback_guard: Option<RollbackGuard>,
}Expand description
Provider-neutral page returned by a chain data source.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.archive_height: Option<u64>Height available in the source archive when the query ran.
next_block: u64Exclusive block cursor for the next page.
blocks: Vec<Block>Blocks returned for the covered range.
logs: Vec<Log>Logs returned for the covered range.
rollback_guard: Option<RollbackGuard>HyperSync continuity metadata for this page.
Implementations§
Source§impl SourcePage
impl SourcePage
Sourcepub fn new(next_block: u64, blocks: Vec<Block>, logs: Vec<Log>) -> Self
pub fn new(next_block: u64, blocks: Vec<Block>, logs: Vec<Log>) -> Self
Create a page with no archive-height or provider-checkpoint metadata.
Sourcepub fn with_archive_height(self, archive_height: Option<u64>) -> Self
pub fn with_archive_height(self, archive_height: Option<u64>) -> Self
Attach the source’s latest-height observation from the same response.
Sourcepub fn with_rollback_guard(self, rollback_guard: Option<RollbackGuard>) -> Self
pub fn with_rollback_guard(self, rollback_guard: Option<RollbackGuard>) -> Self
Attach provider-native continuity metadata from the same response.
Trait Implementations§
Source§impl Clone for SourcePage
impl Clone for SourcePage
Source§impl Debug for SourcePage
impl Debug for SourcePage
Auto Trait Implementations§
impl Freeze for SourcePage
impl RefUnwindSafe for SourcePage
impl Send for SourcePage
impl Sync for SourcePage
impl Unpin for SourcePage
impl UnsafeUnpin for SourcePage
impl UnwindSafe for SourcePage
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request