pub struct FileNodeItem {
pub path_buf: PathBuf,
pub is_dir: bool,
pub read: bool,
pub open: bool,
pub children: HashMap<PathBuf, FileNodeItem>,
pub children_open_count: usize,
}
Fields§
§path_buf: PathBuf
§is_dir: bool
§read: bool
§open: bool
§children: HashMap<PathBuf, FileNodeItem>
§children_open_count: usize
Implementations§
Source§impl FileNodeItem
impl FileNodeItem
pub fn sorted_children(&self) -> Vec<&FileNodeItem>
pub fn sorted_children_mut(&mut self) -> Vec<&mut FileNodeItem>
pub fn get_file_node(&self, path: &Path) -> Option<&FileNodeItem>
pub fn get_file_node_mut(&mut self, path: &Path) -> Option<&mut FileNodeItem>
pub fn remove_child(&mut self, path: &Path) -> Option<FileNodeItem>
pub fn add_child(&mut self, path: &Path, is_dir: bool) -> Option<()>
pub fn set_item_children( &mut self, path: &Path, children: HashMap<PathBuf, FileNodeItem>, )
pub fn update_node_count(&mut self, path: &Path) -> Option<()>
Trait Implementations§
Source§impl Clone for FileNodeItem
impl Clone for FileNodeItem
Source§fn clone(&self) -> FileNodeItem
fn clone(&self) -> FileNodeItem
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 Debug for FileNodeItem
impl Debug for FileNodeItem
Source§impl<'de> Deserialize<'de> for FileNodeItem
impl<'de> Deserialize<'de> for FileNodeItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FileNodeItem
impl PartialEq for FileNodeItem
Source§impl PartialOrd for FileNodeItem
impl PartialOrd for FileNodeItem
Source§impl Serialize for FileNodeItem
impl Serialize for FileNodeItem
impl Eq for FileNodeItem
impl StructuralPartialEq for FileNodeItem
Auto Trait Implementations§
impl Freeze for FileNodeItem
impl RefUnwindSafe for FileNodeItem
impl Send for FileNodeItem
impl Sync for FileNodeItem
impl Unpin for FileNodeItem
impl UnwindSafe for FileNodeItem
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