JournalTxEnd

Struct JournalTxEnd 

Source
pub struct JournalTxEnd {
    pub tx_id: u64,
    _pad: [u8; 4088],
}
Expand description

Represents a journal transaction is ended.

This structure is used during transaction commit to mark the end of transaction.

Fields§

§tx_id: u64

Transaction id.

§_pad: [u8; 4088]

Implementations§

Source§

impl JournalTxEnd

Source

pub fn new(tx_id: u64) -> Box<Self>

Creates a new, empty journal TxEnd block.

Source

pub fn from_io( io: &JournalIO<'_>, lba: LogicalBlockAddress, ) -> Result<Box<Self>, KernelError>

Loads a journal TxEnd block from disk at the specified LBA.

§Arguments
  • io: Interface for reading blocks from disk.
  • lba: Logical block address of the journal transaction block to load.
§Returns
  • Ok(Box<Self>): The loaded journal transaction block.
  • Err(KernelError): If the block could not be read or parsed.
Source

pub fn into_block(self: Box<Self>) -> Box<[u8; 4096]>

Converts this transaction into a 4096-byte block suitable for writing to disk.

This is typically used during transaction commit.

Auto Trait Implementations§

§

impl Freeze for JournalTxEnd

§

impl RefUnwindSafe for JournalTxEnd

§

impl Send for JournalTxEnd

§

impl Sync for JournalTxEnd

§

impl Unpin for JournalTxEnd

§

impl UnwindSafe for JournalTxEnd

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.