pub struct PageSnapshot { /* private fields */ }Expand description
Versioned restorable page snapshot preserved across Freeze and Evict (discarded on explicit Destroy).
Implementations§
Source§impl PageSnapshot
Builder helpers for versioned PageSnapshot.
impl PageSnapshot
Builder helpers for versioned PageSnapshot.
Sourcepub fn capture(
route_key: String,
generation: u64,
scroll_offset: Point,
focus_key: Option<String>,
draft_payload: String,
unsaved_flags: (bool, bool),
host_state_revision: u64,
) -> Self
pub fn capture( route_key: String, generation: u64, scroll_offset: Point, focus_key: Option<String>, draft_payload: String, unsaved_flags: (bool, bool), host_state_revision: u64, ) -> Self
Creates a schema-versioned PageSnapshot capturing scroll, focus, and optional unsaved draft state.
§Arguments
String- Canonical route identifier.u64- Source page generation.Point- Saved primary scroll offset.Option<String>- Optional focused element key.String- Serialized draft payload (empty when no draft).(bool, bool)- Tuple(has_unsaved_draft, draft_persisted)tracking unsaved draft protection status.u64- Host state revision at capture time.
§Returns
Self- Ready versioned snapshot.
Source§impl PageSnapshot
impl PageSnapshot
pub fn get_schema_version(&self) -> u32
pub fn get_mut_schema_version(&mut self) -> &mut u32
pub fn set_schema_version(&mut self, val: u32) -> &mut Self
pub fn get_route_key(&self) -> &String
pub fn get_mut_route_key(&mut self) -> &mut String
pub fn set_route_key(&mut self, val: String) -> &mut Self
pub fn get_generation(&self) -> u64
pub fn get_mut_generation(&mut self) -> &mut u64
pub fn set_generation(&mut self, val: u64) -> &mut Self
pub fn get_scroll_offset(&self) -> Point
pub fn get_mut_scroll_offset(&mut self) -> &mut Point
pub fn set_scroll_offset(&mut self, val: Point) -> &mut Self
pub fn get_focus_key(&self) -> &String
pub fn get_mut_focus_key(&mut self) -> &mut String
pub fn set_focus_key(&mut self, val: String) -> &mut Self
pub fn get_has_focus_key(&self) -> bool
pub fn get_mut_has_focus_key(&mut self) -> &mut bool
pub fn set_has_focus_key(&mut self, val: bool) -> &mut Self
pub fn get_draft_payload(&self) -> &String
pub fn get_mut_draft_payload(&mut self) -> &mut String
pub fn set_draft_payload(&mut self, val: String) -> &mut Self
pub fn get_has_unsaved_draft(&self) -> bool
pub fn get_mut_has_unsaved_draft(&mut self) -> &mut bool
pub fn set_has_unsaved_draft(&mut self, val: bool) -> &mut Self
pub fn get_draft_persisted(&self) -> bool
pub fn get_mut_draft_persisted(&mut self) -> &mut bool
pub fn set_draft_persisted(&mut self, val: bool) -> &mut Self
pub fn get_host_state_revision(&self) -> u64
pub fn get_mut_host_state_revision(&mut self) -> &mut u64
pub fn set_host_state_revision(&mut self, val: u64) -> &mut Self
pub fn get_estimated_bytes(&self) -> usize
pub fn get_mut_estimated_bytes(&mut self) -> &mut usize
pub fn set_estimated_bytes(&mut self, val: usize) -> &mut Self
Trait Implementations§
Source§impl Clone for PageSnapshot
impl Clone for PageSnapshot
Source§impl Debug for PageSnapshot
impl Debug for PageSnapshot
Source§impl Default for PageSnapshot
impl Default for PageSnapshot
Source§impl PartialEq for PageSnapshot
impl PartialEq for PageSnapshot
impl StructuralPartialEq for PageSnapshot
Auto Trait Implementations§
impl Forget for PageSnapshot
impl Freeze for PageSnapshot
impl Move for PageSnapshot
impl RefUnwindSafe for PageSnapshot
impl Send for PageSnapshotwhere
RawVecInner: Send,
impl Sync for PageSnapshotwhere
RawVecInner: Sync,
impl Unpin for PageSnapshot
impl UnsafeUnpin for PageSnapshot
impl UnwindSafe for PageSnapshotwhere
RawVecInner: UnwindSafe,
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