[−][src]Struct mini_fs::MiniFs
Virtual filesystem.
Methods
impl MiniFs
[src]
pub fn new() -> Self
[src]
pub fn mount<P, F>(self, path: P, store: F) -> Self where
P: Into<PathBuf>,
F: Store + Send + 'static,
[src]
P: Into<PathBuf>,
F: Store + Send + 'static,
pub fn umount<P: AsRef<Path>>(&mut self, path: P) -> Option<Box<dyn Store>>
[src]
Unmounts store mounted at the given location.
Returns the unmounted store if the given path was a valid mounting
point. Returns None
otherwise.
Example
let a = Local::new("/"); let b = Local::new("/etc"); let mut fs = MiniFs::new().mount("/", a).mount("/etc", b); assert!(fs.umount("/etc").is_some()); assert!(fs.umount("/etc").is_none());
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
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>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,