[][src]Struct sunrise_fs::detail::driver::fat::directory::DirectoryInterface

pub struct DirectoryInterface {
    base_path: ArrayString<[u8; 768]>,
    inner_fs: Arc<Mutex<FatFileSystem<Box<dyn StorageDevice<Error = Error> + Send>>>>,
    internal_iter: FatDirectoryEntryIterator,
    filter_fn: fn(_: &FatDirectoryEntry) -> bool,
    entry_count: u64,
}

A libfat directory reader implementing DirectoryOperations.

Fields

base_path: ArrayString<[u8; 768]>

The opened directory path. Used to get the complete path of every entries.

inner_fs: Arc<Mutex<FatFileSystem<Box<dyn StorageDevice<Error = Error> + Send>>>>

libfat filesystem interface.

internal_iter: FatDirectoryEntryIterator

The iterator used to iter over libfat's directory entries.

filter_fn: fn(_: &FatDirectoryEntry) -> bool

The filter required by the user.

entry_count: u64

The number of entries in the directory after filter_fn.

Implementations

impl<'a> DirectoryInterface[src]

pub fn new(
    base_path: ArrayString<[u8; 768]>,
    inner_fs: Arc<Mutex<FatFileSystem<Box<dyn StorageDevice<Error = Error> + Send>>>>,
    internal_iter: FatDirectoryEntryIterator,
    filter_fn: fn(_: &FatDirectoryEntry) -> bool,
    entry_count: u64
) -> Self
[src]

Create a new DirectoryInterface.

fn convert_entry(
    fat_dir_entry: FatDirectoryEntry,
    base_path: &ArrayString<[u8; 768]>
) -> LibUserResult<DirectoryEntry>
[src]

convert libfat's DirectoryEntry to libfs's DirectoryEntry.

Trait Implementations

impl Debug for DirectoryInterface[src]

impl DirectoryOperations for DirectoryInterface[src]

Auto Trait Implementations

impl !RefUnwindSafe for DirectoryInterface

impl Send for DirectoryInterface

impl Sync for DirectoryInterface

impl Unpin for DirectoryInterface

impl !UnwindSafe for DirectoryInterface

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SizedIPCBuffer for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.