pub struct VersionedMapBackup {
pub map_id: Vec<u8>,
pub head: MapVersionId,
pub versions: Vec<MapBackupVersion>,
}Expand description
Portable backup of one complete managed-map catalog.
Fields§
§map_id: Vec<u8>Application map identifier.
head: MapVersionIdVersion that was head when the backup was created.
versions: Vec<MapBackupVersion>Every cataloged immutable version.
Implementations§
Source§impl VersionedMapBackup
impl VersionedMapBackup
Sourcepub fn verify(&self) -> Result<(), Error>
pub fn verify(&self) -> Result<(), Error>
Verify version IDs, bundle completeness, uniqueness, and head presence.
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>, Error>
pub fn to_bytes(&self) -> Result<Vec<u8>, Error>
Serialize this backup as deterministic versioned CBOR.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, Error>
Decode and fully verify a portable backup.
Trait Implementations§
Source§impl Clone for VersionedMapBackup
impl Clone for VersionedMapBackup
Source§fn clone(&self) -> VersionedMapBackup
fn clone(&self) -> VersionedMapBackup
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 VersionedMapBackup
impl Debug for VersionedMapBackup
Source§impl PartialEq for VersionedMapBackup
impl PartialEq for VersionedMapBackup
impl StructuralPartialEq for VersionedMapBackup
Auto Trait Implementations§
impl Freeze for VersionedMapBackup
impl RefUnwindSafe for VersionedMapBackup
impl Send for VersionedMapBackup
impl Sync for VersionedMapBackup
impl Unpin for VersionedMapBackup
impl UnsafeUnpin for VersionedMapBackup
impl UnwindSafe for VersionedMapBackup
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> 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