Skip to main content

OpenFilesystem

Struct OpenFilesystem 

Source
pub struct OpenFilesystem<R> {
    pub reader: BlockReader<R>,
    pub superblock: Superblock,
    pub tree_roots: BTreeMap<u64, (u64, u64)>,
    pub per_device_dev_items: BTreeMap<u64, DeviceItem>,
}
Expand description

Result of opening a btrfs filesystem from a block device or image.

Fields§

§reader: BlockReader<R>

Block reader with fully populated chunk cache.

§superblock: Superblock

Parsed primary-device superblock.

§tree_roots: BTreeMap<u64, (u64, u64)>

Map of tree ID -> (root block logical address, key offset), from the root tree.

§per_device_dev_items: BTreeMap<u64, DeviceItem>

Per-device dev_item snapshots taken at open time. One entry per opened device (always at least the primary). The transaction crate uses these to splice the correct per-device identity into the superblock when writing it back during commit, so a multi-device filesystem doesn’t get clobbered with the primary device’s dev_item.

Auto Trait Implementations§

§

impl<R> Freeze for OpenFilesystem<R>

§

impl<R> RefUnwindSafe for OpenFilesystem<R>
where R: RefUnwindSafe,

§

impl<R> Send for OpenFilesystem<R>
where R: Send,

§

impl<R> Sync for OpenFilesystem<R>
where R: Sync,

§

impl<R> Unpin for OpenFilesystem<R>

§

impl<R> UnsafeUnpin for OpenFilesystem<R>

§

impl<R> UnwindSafe for OpenFilesystem<R>
where R: RefUnwindSafe,

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.