Type Alias Mutation

Source
pub type Mutation = MutationV43;
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(ObjectStoreMutationV43),
    EncryptedObjectStore(Box<[u8]>),
    Allocator(AllocatorMutationV32),
    BeginFlush,
    EndFlush,
    DeleteVolume,
    UpdateBorrowed(u64),
    UpdateMutationsKey(UpdateMutationsKeyV40),
    CreateInternalDir(u64),
}

Variants§

§

ObjectStore(ObjectStoreMutationV43)

§

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 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.
Source§

impl Clone for MutationV43

Source§

fn clone(&self) -> MutationV43

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MutationV43

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for MutationV43

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<MutationV41> for MutationV43

Source§

fn from(from: MutationV41) -> Self

Converts to this type from the input type.
Source§

impl Ord for MutationV43

Source§

fn cmp(&self, other: &MutationV43) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for MutationV43

Source§

fn eq(&self, other: &MutationV43) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for MutationV43

Source§

fn partial_cmp(&self, other: &MutationV43) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for MutationV43

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TypeFingerprint for MutationV43

Source§

impl Versioned for MutationV43

Source§

fn max_serialized_size() -> u64

Source§

fn deserialize_from<R>(reader: &mut R, _version: Version) -> Result<Self>
where R: Read + ?Sized, for<'de> Self: Deserialize<'de>,

Source§

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

Source§

impl Eq for MutationV43

Source§

impl StructuralPartialEq for MutationV43