pub struct CaselessFs<S> { /* private fields */ }
Expand description
Caseless filesystem wrapping an inner filesystem.
Implementations§
Source§impl<S: Store> CaselessFs<S>
impl<S: Store> CaselessFs<S>
Sourcepub fn new(inner: S) -> Self
pub fn new(inner: S) -> Self
Creates a new caseless filesystem with the provided inner filesystem. It treats paths as case-insensitive, regardless of the case of the inner filesystem.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Moves the inner filesystem out of the caseless filesystem. Inspired by std::io::Cursor.
Sourcepub fn get_ref(&self) -> &S
pub fn get_ref(&self) -> &S
Gets a reference to the inner filesystem. Inspired by std::io::Cursor.
Trait Implementations§
Source§impl<S: Clone> Clone for CaselessFs<S>
impl<S: Clone> Clone for CaselessFs<S>
Source§fn clone(&self) -> CaselessFs<S>
fn clone(&self) -> CaselessFs<S>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<S: Debug> Debug for CaselessFs<S>
impl<S: Debug> Debug for CaselessFs<S>
Source§impl<S: Store> Store for CaselessFs<S>
impl<S: Store> Store for CaselessFs<S>
Source§fn open_path(&self, path: &Path) -> Result<Self::File>
fn open_path(&self, path: &Path) -> Result<Self::File>
Opens the file identified by the caseless path. A caseless path that matches the real path of a file always opens that file. Otherwise a caseless path will open the first path of the inner filesystem that matches the caseless path.
Source§fn entries_path(&self, path: &Path) -> Result<Entries<'_>>
fn entries_path(&self, path: &Path) -> Result<Entries<'_>>
Iterates over the entries of the inner filesystem.
type File = <S as Store>::File
Auto Trait Implementations§
impl<S> Freeze for CaselessFs<S>where
S: Freeze,
impl<S> RefUnwindSafe for CaselessFs<S>where
S: RefUnwindSafe,
impl<S> Send for CaselessFs<S>where
S: Send,
impl<S> Sync for CaselessFs<S>where
S: Sync,
impl<S> Unpin for CaselessFs<S>where
S: Unpin,
impl<S> UnwindSafe for CaselessFs<S>where
S: UnwindSafe,
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
Mutably borrows from an owned value. Read more