pub struct Archive<D> { /* private fields */ }
Expand description
An archive of strongly-typed data.
Implementations§
Source§impl<D> Archive<D>
impl<D> Archive<D>
Sourcepub fn new(backend: impl StorageBackend) -> Result<Self, ArchiveError>
pub fn new(backend: impl StorageBackend) -> Result<Self, ArchiveError>
Opens an archive with the specified storage backend.
Sourcepub fn version(&self) -> Result<Version, ArchiveError>
pub fn version(&self) -> Result<Version, ArchiveError>
Gets the application-defined archive version.
Sourcepub fn set_version(&self, version: &Version) -> Result<(), ArchiveError>
pub fn set_version(&self, version: &Version) -> Result<(), ArchiveError>
Sets the application-defined archive version.
Sourcepub fn read(&self) -> Result<Transaction<'_, Const, D>, ArchiveError>
pub fn read(&self) -> Result<Transaction<'_, Const, D>, ArchiveError>
Initiates a read transaction against the archive.
Sourcepub fn write(&self) -> Result<Transaction<'_, Mut, D>, ArchiveError>
pub fn write(&self) -> Result<Transaction<'_, Mut, D>, ArchiveError>
Initiates a write transaction against the archive.
Trait Implementations§
Auto Trait Implementations§
impl<D> !Freeze for Archive<D>
impl<D> !RefUnwindSafe for Archive<D>
impl<D> Send for Archive<D>where
D: Send,
impl<D> Sync for Archive<D>where
D: Sync,
impl<D> Unpin for Archive<D>where
D: Unpin,
impl<D> !UnwindSafe for Archive<D>
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