Type Alias Mutation

Source
pub type Mutation = MutationV46;
Expand description

The journal consists of these records which will be replayed at mount time. Within a transaction, these are stored as a set which allows some mutations to be deduplicated and found (and we require custom comparison functions below). For example, we need to be able to find object size changes.

Aliased Type§

enum Mutation {
    ObjectStore(ObjectStoreMutationV46),
    EncryptedObjectStore(Box<[u8]>),
    Allocator(AllocatorMutationV32),
    BeginFlush,
    EndFlush,
    DeleteVolume,
    UpdateBorrowed(u64),
    UpdateMutationsKey(UpdateMutationsKeyV40),
    CreateInternalDir(u64),
}

Variants§

§

ObjectStore(ObjectStoreMutationV46)

§

EncryptedObjectStore(Box<[u8]>)

§

Allocator(AllocatorMutationV32)

§

BeginFlush

§

EndFlush

§

DeleteVolume

§

UpdateBorrowed(u64)

§

UpdateMutationsKey(UpdateMutationsKeyV40)

§

CreateInternalDir(u64)

Implementations§

Source§

impl Mutation

Source

pub fn insert_object(key: ObjectKey, value: ObjectValue) -> Self

Source

pub fn replace_or_insert_object(key: ObjectKey, value: ObjectValue) -> Self

Source

pub fn merge_object(key: ObjectKey, value: ObjectValue) -> Self

Source

pub fn update_mutations_key(key: WrappedKey) -> Self

Trait Implementations§

Source§

impl From<MutationV40> for Mutation

Source§

fn from(item: MutationV40) -> Self

Converts to this type from the input type.
Source§

impl From<MutationV41> for Mutation

Source§

fn from(item: MutationV41) -> Self

Converts to this type from the input type.
Source§

impl VersionedLatest for Mutation

Source§

fn deserialize_from_version<R>(reader: &mut R, version: Version) -> Result<Self>
where R: Read, Self: Sized,

Deserializes from a given version format and upgrades to the latest version.
Source§

fn deserialize_with_version<R>(reader: &mut R) -> Result<(Self, Version)>
where R: Read, Self: Sized,

Like deserialize_from_version but reads Version from reader first, then uses it to deserialize self.
Source§

fn serialize_with_version<W>(&self, writer: &mut W) -> Result<()>
where W: Write, Self: Sized,

Like serialize_into but serialized Version first, then self.