pub enum EntryKind {
Directory,
File,
Symlink,
}Expand description
The entry’s file type: a directory, a file, or a symbolic link.
Variants§
Implementations§
Source§impl EntryKind
impl EntryKind
Sourcepub fn is_dir(self) -> bool
pub fn is_dir(self) -> bool
Returns if this is a EntryKind::Directory
assert!(EntryKind::Directory.is_dir());Sourcepub fn is_file(self) -> bool
pub fn is_file(self) -> bool
Returns if this is a EntryKind::File
for entry in archive.entries().filter(|e| e.kind().is_file()) {
// ...
}Sourcepub fn is_symlink(self) -> bool
pub fn is_symlink(self) -> bool
Returns if this is a EntryKind::Symlink
for entry in archive.entries() {
if entry.kind().is_symlink() {
continue;
}
// ...
}Trait Implementations§
impl Copy for EntryKind
impl Eq for EntryKind
impl StructuralPartialEq for EntryKind
Auto Trait Implementations§
impl Freeze for EntryKind
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnwindSafe for EntryKind
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