pub trait PathioHierarchy<D> {
Show 14 methods // Required methods fn add_directory( &mut self, directory: D, name: impl Borrow<str> ) -> Result<(), PathioError>; fn insert_directory( &mut self, directory: D, path: impl Borrow<str> ) -> Result<(), PathioError>; fn create_directory( &mut self, path: impl Borrow<str> ) -> Result<(), PathioError>; fn take_directory( &mut self, name: impl Borrow<str> ) -> Result<D, PathioError>; fn remove_directory( &mut self, path: impl Borrow<str> ) -> Result<D, PathioError>; fn obtain_directory( &self, name: impl Borrow<str> ) -> Result<&D, PathioError>; fn obtain_directory_mut( &mut self, name: impl Borrow<str> ) -> Result<&mut D, PathioError>; fn borrow_directory( &self, path: impl Borrow<str> ) -> Result<&D, PathioError>; fn borrow_directory_mut( &mut self, path: impl Borrow<str> ) -> Result<&mut D, PathioError>; fn merge(&mut self, directory: impl Into<D>) -> Result<(), PathioError>; fn list(&self) -> String; fn get_name(&self) -> &String; fn get_depth(&self) -> f32; fn get_path(&self) -> &String;
}

Required Methods§

source

fn add_directory( &mut self, directory: D, name: impl Borrow<str> ) -> Result<(), PathioError>

Adds subdirectory directly to this directory

source

fn insert_directory( &mut self, directory: D, path: impl Borrow<str> ) -> Result<(), PathioError>

Inserts subdirectory to self or any subdirectory

source

fn create_directory( &mut self, path: impl Borrow<str> ) -> Result<(), PathioError>

Creates subdirectory in root or any subdirectory

source

fn take_directory(&mut self, name: impl Borrow<str>) -> Result<D, PathioError>

Removes directory from self and returns it

source

fn remove_directory(&mut self, path: impl Borrow<str>) -> Result<D, PathioError>

Removes directory from self or any subdirectory and returns it

source

fn obtain_directory(&self, name: impl Borrow<str>) -> Result<&D, PathioError>

Borrow directory from self

source

fn obtain_directory_mut( &mut self, name: impl Borrow<str> ) -> Result<&mut D, PathioError>

Borrow directory from self

source

fn borrow_directory(&self, path: impl Borrow<str>) -> Result<&D, PathioError>

Borrow directory from self or any subdirectory

source

fn borrow_directory_mut( &mut self, path: impl Borrow<str> ) -> Result<&mut D, PathioError>

Borrow directory from self or any subdirectory

source

fn merge(&mut self, directory: impl Into<D>) -> Result<(), PathioError>

Merges PathTree or Directory content into itself

source

fn list(&self) -> String

Generate overview of the inner tree in a stringified form

source

fn get_name(&self) -> &String

Returns cached name

source

fn get_depth(&self) -> f32

Returns cached depth

source

fn get_path(&self) -> &String

Returns cached name

Implementors§