pub struct Frame0File;Expand description
Frame-0 NV02 keyframe file (frame0.nv02) + 40-byte little-endian footer.
Implementations§
Source§impl Frame0File
impl Frame0File
pub fn encode( store: &NodeStore, meta: Frame0Meta, ) -> Result<Vec<u8>, PersistenceError>
pub fn encode_nv02( nv02_payload: &[u8], node_count: u32, meta: Frame0Meta, ) -> Result<Vec<u8>, PersistenceError>
pub fn save( path: impl AsRef<Path>, store: &NodeStore, meta: Frame0Meta, ) -> Result<Frame0Footer, PersistenceError>
pub fn save_bytes( path: impl AsRef<Path>, envelope_bytes: &[u8], ) -> Result<(), PersistenceError>
pub fn validate_bytes( bytes: &[u8], expected: Frame0Meta, ) -> Result<(Frame0Footer, &[u8]), Frame0Miss>
Sourcepub fn read_and_validate_bytes(
bytes: &[u8],
expected_schema_hash: u64,
expected_app_build_id: u64,
expected_env_hash: u64,
) -> Result<(Frame0Footer, &[u8]), Frame0Miss>
pub fn read_and_validate_bytes( bytes: &[u8], expected_schema_hash: u64, expected_app_build_id: u64, expected_env_hash: u64, ) -> Result<(Frame0Footer, &[u8]), Frame0Miss>
Validates an in-memory frame0.nv02 envelope buffer against the expected schema hash,
app build ID, and environment hash, returning the parsed footer and borrowed NV02
keyframe payload slice without copying.
pub fn read_and_validate( path: impl AsRef<Path>, expected: Frame0Meta, ) -> Result<(Frame0Footer, Vec<u8>), Frame0Miss>
pub fn boot_bytes_into_replica<B: StoreBackend>( bytes: &[u8], expected: Frame0Meta, replica: &mut StoreWireReplica<B>, ) -> Result<(Frame0Footer, BackendApplyStats), Frame0Miss>
pub fn boot_into_replica<B: StoreBackend>( path: impl AsRef<Path>, expected: Frame0Meta, replica: &mut StoreWireReplica<B>, ) -> Result<(Frame0Footer, BackendApplyStats), Frame0Miss>
pub fn boot_into_replica_with_buf<B: StoreBackend>( path: impl AsRef<Path>, expected: Frame0Meta, scratch: &mut Vec<u8>, replica: &mut StoreWireReplica<B>, ) -> Result<(Frame0Footer, BackendApplyStats), Frame0Miss>
Sourcepub fn file_has_nv02_magic(path: &Path) -> bool
pub fn file_has_nv02_magic(path: &Path) -> bool
Returns true iff path exists, is readable, and begins with the 4-byte NV02 magic
header (prevents corrupt-file cleanup from deleting unrelated files).
Auto Trait Implementations§
impl Forget for Frame0File
impl Freeze for Frame0File
impl Move for Frame0File
impl RefUnwindSafe for Frame0File
impl Send for Frame0File
impl Sync for Frame0File
impl Unpin for Frame0File
impl UnsafeUnpin for Frame0File
impl UnwindSafe for Frame0File
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