OverlayFs

Struct OverlayFs 

Source
pub struct OverlayFs { /* private fields */ }
Expand description

Kernel overlay filesystem handle

Implementations§

Source§

impl OverlayFs

Source

pub fn new( lower: impl IntoIterator<Item = impl AsRef<Path>>, upper: Option<impl Into<PathBuf>>, work: Option<impl Into<PathBuf>>, target: impl AsRef<Path>, drop: bool, ) -> Result<OverlayFs>

Source

pub fn readonly( lower: impl IntoIterator<Item = impl AsRef<Path>>, target: impl AsRef<Path>, ) -> Result<OverlayFs>

Source

pub fn writable( lower: impl IntoIterator<Item = impl AsRef<Path>>, upper: impl AsRef<Path>, work: impl AsRef<Path>, target: impl AsRef<Path>, ) -> Result<OverlayFs>

Source

pub fn work(&self) -> Option<&PathBuf>

Source

pub fn set_work(&mut self, work: PathBuf) -> Result<()>

Trait Implementations§

Source§

impl Debug for OverlayFs

Source§

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

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

impl Drop for OverlayFs

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Filesystem for OverlayFs

Source§

fn mount(&mut self) -> Result<&mut Self>

Request a handle to mount the filesystem
Source§

fn unmount(&mut self) -> Result<&mut Self>

Request a handle to unmount the filesystem
Source§

fn scoped(&self) -> bool

Retrieve whetever mount is scoped (unmount on drop)
Source§

fn set_scoped(&mut self, drop: bool) -> &mut Self

Set whetever mount is scoped (unmount on drop)
Source§

fn id(&self) -> Option<&PartitionID>

Retrieve the partition Identifier “dev id” on UNIX and “volume serial number” on Windows if the partition isn’t mounted, it’ll return None
Source§

fn target(&self) -> PathBuf

Retrieve the mount point as PathBuf
Source§

fn set_target(&mut self, target: impl AsRef<Path>) -> Result<&mut Self>

Set Target mount point
Source§

fn is_available() -> bool

Get if the filesystem is available
Source§

fn add_option(&mut self, option: impl Into<String>) -> Result<()>

Add option
Source§

fn remove_option(&mut self, option: impl AsRef<str>) -> Result<()>

Remove an option
Source§

fn options(&self) -> &[String]

List currently active option
Source§

fn mounted(&self) -> bool

Check if the partition is mounted
Source§

fn append_options<I, T>(&mut self, options: I) -> Result<()>
where I: IntoIterator<Item = T>, T: Into<String>,

Add a collection of option
Source§

impl StackableFilesystem for OverlayFs

Source§

fn lower(&self) -> Vec<&Path>

Retrieve a list of lower layer
Source§

fn set_lower( &mut self, lower: impl IntoIterator<Item = impl AsRef<Path>>, ) -> Result<&mut Self>

Set lower layer
Source§

fn upper(&self) -> Option<&Path>

Retrieve upper layer if set
Source§

fn set_upper(&mut self, upper: impl Into<PathBuf>) -> Result<&mut Self>

Set upper layer
Source§

impl StateRecovery for OverlayFs

Source§

fn recover<P: AsRef<Path>>(path: P) -> Result<Self>

Recover a filesystem handle from system information

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more