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.
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
impl Clone for JournalRecordV54
Source§fn clone(&self) -> JournalRecordV54
fn clone(&self) -> JournalRecordV54
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JournalRecordV54
impl Debug for JournalRecordV54
Source§impl<'de> Deserialize<'de> for JournalRecordV54
impl<'de> Deserialize<'de> for JournalRecordV54
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<JournalRecordV40> for JournalRecordV54
impl From<JournalRecordV40> for JournalRecordV54
Source§fn from(item: JournalRecordV40) -> Self
fn from(item: JournalRecordV40) -> Self
Source§impl From<JournalRecordV41> for JournalRecordV54
impl From<JournalRecordV41> for JournalRecordV54
Source§fn from(item: JournalRecordV41) -> Self
fn from(item: JournalRecordV41) -> Self
Source§impl From<JournalRecordV42> for JournalRecordV54
impl From<JournalRecordV42> for JournalRecordV54
Source§fn from(item: JournalRecordV42) -> Self
fn from(item: JournalRecordV42) -> Self
Source§impl From<JournalRecordV43> for JournalRecordV54
impl From<JournalRecordV43> for JournalRecordV54
Source§fn from(item: JournalRecordV43) -> Self
fn from(item: JournalRecordV43) -> Self
Source§impl From<JournalRecordV46> for JournalRecordV54
impl From<JournalRecordV46> for JournalRecordV54
Source§fn from(item: JournalRecordV46) -> Self
fn from(item: JournalRecordV46) -> Self
Source§impl From<JournalRecordV47> for JournalRecordV54
impl From<JournalRecordV47> for JournalRecordV54
Source§fn from(item: JournalRecordV47) -> Self
fn from(item: JournalRecordV47) -> Self
Source§impl From<JournalRecordV49> for JournalRecordV54
impl From<JournalRecordV49> for JournalRecordV54
Source§fn from(item: JournalRecordV49) -> Self
fn from(item: JournalRecordV49) -> Self
Source§impl From<JournalRecordV50> for JournalRecordV54
impl From<JournalRecordV50> for JournalRecordV54
Source§fn from(from: JournalRecordV50) -> Self
fn from(from: JournalRecordV50) -> Self
Source§impl Serialize for JournalRecordV54
impl Serialize for JournalRecordV54
Source§impl TypeFingerprint for JournalRecordV54
impl TypeFingerprint for JournalRecordV54
fn fingerprint() -> String
Source§impl Versioned for JournalRecordV54
impl Versioned for JournalRecordV54
Source§fn max_serialized_size() -> Option<u64>
fn max_serialized_size() -> Option<u64>
fn deserialize_from<R>(reader: &mut R, _version: Version) -> Result<Self>
fn serialize_into<W>(&self, writer: &mut W) -> Result<()>
Source§impl VersionedLatest for JournalRecordV54
impl VersionedLatest for JournalRecordV54
Source§fn deserialize_from_version<R>(reader: &mut R, version: Version) -> Result<Self>
fn deserialize_from_version<R>(reader: &mut R, version: Version) -> Result<Self>
Auto Trait Implementations§
impl Freeze for JournalRecordV54
impl RefUnwindSafe for JournalRecordV54
impl Send for JournalRecordV54
impl Sync for JournalRecordV54
impl Unpin for JournalRecordV54
impl UnsafeUnpin for JournalRecordV54
impl UnwindSafe for JournalRecordV54
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
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>
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>
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