Skip to main content

JournalRecordV54

Enum JournalRecordV54 

Source
pub enum JournalRecordV54 {
    EndBlock,
    Mutation {
        object_id: u64,
        mutation: MutationV54,
    },
    Commit,
    Discard(u64),
    DidFlushDevice(u64),
    DataChecksums(Range<u64>, ChecksumsV38, bool),
}

Variants§

§

EndBlock

Indicates no more records in this block.

§

Mutation

Mutation for a particular object. object_id here is for the collection i.e. the store or allocator.

Fields

§object_id: u64
§mutation: MutationV54
§

Commit

Commits records in the transaction.

§

Discard(u64)

Discard all mutations with offsets greater than or equal to the given offset.

§

DidFlushDevice(u64)

Indicates the device was flushed at the given journal offset. Note that this really means that at this point in the journal offset, we can be certain that there’s no remaining buffered data in the block device; the buffers and the disk contents are consistent. We insert one of these records after a flush along with the next transaction to go through. If that never comes (either due to graceful or hard shutdown), the journal reset on the next mount will serve the same purpose and count as a flush, although it is necessary to defensively flush the device before replaying the journal (if possible, i.e. not read-only) in case the block device connection was reused.

§

DataChecksums(Range<u64>, ChecksumsV38, bool)

Checksums for a data range written by this transaction. A transaction is only valid if these checksums are right. The range is the device offset the checksums are for.

A boolean indicates whether this range is being written to for the first time. For overwrite extents, we only check the checksums for a block if it has been written to for the first time since the last flush, because otherwise we can’t roll it back anyway so it doesn’t matter. For copy-on-write extents, the bool is always true.

Trait Implementations§

Source§

impl Clone for JournalRecordV54

Source§

fn clone(&self) -> JournalRecordV54

Returns a duplicate 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 JournalRecordV54

Source§

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

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

impl<'de> Deserialize<'de> for JournalRecordV54

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<JournalRecordV40> for JournalRecordV54

Source§

fn from(item: JournalRecordV40) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV41> for JournalRecordV54

Source§

fn from(item: JournalRecordV41) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV42> for JournalRecordV54

Source§

fn from(item: JournalRecordV42) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV43> for JournalRecordV54

Source§

fn from(item: JournalRecordV43) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV46> for JournalRecordV54

Source§

fn from(item: JournalRecordV46) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV47> for JournalRecordV54

Source§

fn from(item: JournalRecordV47) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV49> for JournalRecordV54

Source§

fn from(item: JournalRecordV49) -> Self

Converts to this type from the input type.
Source§

impl From<JournalRecordV50> for JournalRecordV54

Source§

fn from(from: JournalRecordV50) -> Self

Converts to this type from the input type.
Source§

impl Serialize for JournalRecordV54

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 JournalRecordV54

Source§

impl Versioned for JournalRecordV54

Source§

fn max_serialized_size() -> Option<u64>

Maximum size of a serialized version of this type. Serialization and deserialization will fail if the limit is exceeded. If None, there is no limit. None is preferred over u64::MAX because serializing and deserializing with a limit has runtime overhead.
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 VersionedLatest for JournalRecordV54

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<V> LayerValue for V
where V: Clone + Send + Sync + Versioned + VersionedLatest + Debug + Unpin + 'static,