Skip to main content

IncludeFile

Trait IncludeFile 

Source
pub trait IncludeFile:
    Serialize
    + DeserializeOwned
    + Sync {
    // Required methods
    fn from_patterns(patterns: Vec<String>) -> Self;
    fn get_patterns(&self) -> &[String];

    // Provided methods
    fn load<P: AsRef<Path> + Send>(
        path: P,
    ) -> impl Future<Output = ConduitResult<Self>> + Send { ... }
    fn save<P: AsRef<Path> + Send>(
        &self,
        path: P,
    ) -> impl Future<Output = ConduitResult<()>> + Send { ... }
    fn scan<P: AsRef<Path>>(&self, root: P) -> Vec<PathBuf> { ... }
}

Required Methods§

Source

fn from_patterns(patterns: Vec<String>) -> Self

Source

fn get_patterns(&self) -> &[String]

Provided Methods§

Source

fn load<P: AsRef<Path> + Send>( path: P, ) -> impl Future<Output = ConduitResult<Self>> + Send

Source

fn save<P: AsRef<Path> + Send>( &self, path: P, ) -> impl Future<Output = ConduitResult<()>> + Send

Source

fn scan<P: AsRef<Path>>(&self, root: P) -> Vec<PathBuf>

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§