pub struct SnapshotStreamRequest {
pub context_id: ContextId,
pub boundary_root_hash: Hash,
pub page_limit: u16,
pub byte_limit: u32,
pub resume_cursor: Option<Vec<u8>>,
}Expand description
Request to stream snapshot pages.
Fields§
§context_id: ContextIdContext being synchronized.
boundary_root_hash: HashBoundary root hash from the negotiated boundary.
page_limit: u16Maximum number of pages to send in a burst.
byte_limit: u32Maximum uncompressed bytes per page.
resume_cursor: Option<Vec<u8>>Optional cursor to resume paging.
Implementations§
Source§impl SnapshotStreamRequest
impl SnapshotStreamRequest
Sourcepub fn validated_byte_limit(&self) -> u32
pub fn validated_byte_limit(&self) -> u32
Get the validated byte limit.
Clamps to MAX_SNAPSHOT_PAGE_SIZE to prevent memory exhaustion.
Trait Implementations§
Source§impl BorshDeserialize for SnapshotStreamRequest
impl BorshDeserialize for SnapshotStreamRequest
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl Clone for SnapshotStreamRequest
impl Clone for SnapshotStreamRequest
Source§fn clone(&self) -> SnapshotStreamRequest
fn clone(&self) -> SnapshotStreamRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotStreamRequest
impl Debug for SnapshotStreamRequest
Source§impl PartialEq for SnapshotStreamRequest
impl PartialEq for SnapshotStreamRequest
impl StructuralPartialEq for SnapshotStreamRequest
Auto Trait Implementations§
impl Freeze for SnapshotStreamRequest
impl RefUnwindSafe for SnapshotStreamRequest
impl Send for SnapshotStreamRequest
impl Sync for SnapshotStreamRequest
impl Unpin for SnapshotStreamRequest
impl UnsafeUnpin for SnapshotStreamRequest
impl UnwindSafe for SnapshotStreamRequest
Blanket Implementations§
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
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 more