pub enum Entry<File, Directory> {
File(File),
Directory(Directory),
}
Expand description
Enum representing either a file or a directory entry.
Variants§
Implementations§
Source§impl<File, Directory> Entry<File, Directory>
impl<File, Directory> Entry<File, Directory>
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Returns true
if the entry is a directory.
Sourcepub fn as_directory(&self) -> Option<&Directory>
pub fn as_directory(&self) -> Option<&Directory>
Returns a reference to the directory if the entry is a directory.
Sourcepub fn into_directory(self) -> Result<Directory, Self>
pub fn into_directory(self) -> Result<Directory, Self>
Converts the entry into a directory, returning an error if it’s not a directory.
Trait Implementations§
Source§impl From<Entry<HttpStoreFile, HttpStoreDirectory>> for AnyStoreEntry
impl From<Entry<HttpStoreFile, HttpStoreDirectory>> for AnyStoreEntry
Source§fn from(value: HttpStoreEntry) -> Self
fn from(value: HttpStoreEntry) -> Self
Converts to this type from the input type.
Source§impl From<Entry<LocalStoreFile, LocalStoreDirectory>> for AnyStoreEntry
impl From<Entry<LocalStoreFile, LocalStoreDirectory>> for AnyStoreEntry
Source§fn from(value: LocalStoreEntry) -> Self
fn from(value: LocalStoreEntry) -> Self
Converts to this type from the input type.
Source§impl From<Entry<NoopStoreFile, NoopStoreDirectory>> for AnyStoreEntry
impl From<Entry<NoopStoreFile, NoopStoreDirectory>> for AnyStoreEntry
Source§fn from(value: NoopStoreEntry) -> Self
fn from(value: NoopStoreEntry) -> Self
Converts to this type from the input type.
Source§impl From<Entry<PCloudStoreFile, PCloudStoreDirectory>> for AnyStoreEntry
impl From<Entry<PCloudStoreFile, PCloudStoreDirectory>> for AnyStoreEntry
Source§fn from(value: PCloudStoreEntry) -> Self
fn from(value: PCloudStoreEntry) -> Self
Converts to this type from the input type.
impl StoreDirectoryReader<Entry<AnyStoreFile, AnyStoreDirectory>> for AnyStoreDirectoryReader
impl StoreDirectoryReader<Entry<HttpStoreFile, HttpStoreDirectory>> for HttpStoreDirectoryReader
impl StoreDirectoryReader<Entry<LocalStoreFile, LocalStoreDirectory>> for LocalStoreDirectoryReader
impl StoreDirectoryReader<Entry<NoopStoreFile, NoopStoreDirectory>> for NoopStoreDirectoryReader
impl StoreDirectoryReader<Entry<PCloudStoreFile, PCloudStoreDirectory>> for PCloudStoreDirectoryReader
Auto Trait Implementations§
impl<File, Directory> Freeze for Entry<File, Directory>
impl<File, Directory> RefUnwindSafe for Entry<File, Directory>where
File: RefUnwindSafe,
Directory: RefUnwindSafe,
impl<File, Directory> Send for Entry<File, Directory>
impl<File, Directory> Sync for Entry<File, Directory>
impl<File, Directory> Unpin for Entry<File, Directory>
impl<File, Directory> UnwindSafe for Entry<File, Directory>where
File: UnwindSafe,
Directory: 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