pub enum ObjectKind {
File {
content: Option<Vec<u8>>,
},
Directory,
Symlink {
target: String,
},
}Expand description
The kind of an Engine object.
Variants§
File
A file. content is Some when the file has modeled content and
None when it is metadata-only.
Directory
A directory. Directories may contain other objects.
Symlink
A symbolic link: a pointer to another path.
The target is stored as the link’s own text, exactly as a real
filesystem stores it — a link is a file whose content is a path.
Engine::lookup resolves links while
walking (with a depth cap), and the object’s size is the length of
its target text, matching stat on a real link.
Implementations§
Source§impl ObjectKind
impl ObjectKind
Sourcepub fn is_directory(&self) -> bool
pub fn is_directory(&self) -> bool
Returns true for directories.
Sourcepub fn is_symlink(&self) -> bool
pub fn is_symlink(&self) -> bool
Returns true for symbolic links.
Trait Implementations§
Source§impl Clone for ObjectKind
impl Clone for ObjectKind
Source§impl Debug for ObjectKind
impl Debug for ObjectKind
impl Eq for ObjectKind
Source§impl PartialEq for ObjectKind
impl PartialEq for ObjectKind
impl StructuralPartialEq for ObjectKind
Auto Trait Implementations§
impl Freeze for ObjectKind
impl RefUnwindSafe for ObjectKind
impl Send for ObjectKind
impl Sync for ObjectKind
impl Unpin for ObjectKind
impl UnsafeUnpin for ObjectKind
impl UnwindSafe for ObjectKind
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