pub struct SnapshotReader;Expand description
Reads and restores snapshots from disk in HLSS format.
Implementations§
Source§impl SnapshotReader
impl SnapshotReader
Sourcepub fn find_latest(dir: &Path) -> Result<Option<PathBuf>, SnapshotError>
pub fn find_latest(dir: &Path) -> Result<Option<PathBuf>, SnapshotError>
Find the latest snapshot in a directory.
Sourcepub fn load(
path: &Path,
graph: &SharedGraph,
) -> Result<SnapshotMeta, SnapshotError>
pub fn load( path: &Path, graph: &SharedGraph, ) -> Result<SnapshotMeta, SnapshotError>
Load a snapshot file and import entities into the graph.
Sourcepub fn load_from_bytes(
data: &[u8],
path: &Path,
graph: &SharedGraph,
) -> Result<SnapshotMeta, SnapshotError>
pub fn load_from_bytes( data: &[u8], path: &Path, graph: &SharedGraph, ) -> Result<SnapshotMeta, SnapshotError>
Load from raw bytes (useful for testing).
Auto Trait Implementations§
impl Freeze for SnapshotReader
impl RefUnwindSafe for SnapshotReader
impl Send for SnapshotReader
impl Sync for SnapshotReader
impl Unpin for SnapshotReader
impl UnsafeUnpin for SnapshotReader
impl UnwindSafe for SnapshotReader
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> 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