Trait TreeBuilder

Source
pub trait TreeBuilder {
    // Required methods
    fn build_tree<'async_trait>(
        dir_path: String,
        excluding: Option<Vec<String>>,
        recursive_excluding: bool,
    ) -> Pin<Box<dyn Future<Output = Vec<Tree>> + Send + 'async_trait>>;
    fn tree_diff(dir_tree: Vec<Tree>, dir_tree_comp: Vec<Tree>) -> bool;
    fn get_content_files<'async_trait>(
        dir_tree: Vec<Tree>,
    ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>;
    fn compare_dir_content(
        dir_content: Vec<String>,
        dir_content_comp: Vec<String>,
    ) -> bool;
}
Expand description

Trait for Tree to create your own TreeBuilder

Required Methods§

Source

fn build_tree<'async_trait>( dir_path: String, excluding: Option<Vec<String>>, recursive_excluding: bool, ) -> Pin<Box<dyn Future<Output = Vec<Tree>> + Send + 'async_trait>>

Build a vector of Tree

Source

fn tree_diff(dir_tree: Vec<Tree>, dir_tree_comp: Vec<Tree>) -> bool

Compare two tree directories and return true if are different

Source

fn get_content_files<'async_trait>( dir_tree: Vec<Tree>, ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>

Get the content by string of all the files in one tree directory

Source

fn compare_dir_content( dir_content: Vec<String>, dir_content_comp: Vec<String>, ) -> bool

compare all the content from two tree directories and return true if both are equal

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§