pub trait FromPath {
type Output;
// Required methods
fn create_instance(path: PathBuf) -> Self::Output;
fn get_filetype() -> PFiles;
// Provided methods
fn from_fullpath(fullpath: PathBuf) -> ResultOf<Self::Output> { ... }
fn from_output(output: PathBuf) -> ResultOf<Self::Output> { ... }
}
Required Associated Types§
Required Methods§
fn create_instance(path: PathBuf) -> Self::Output
fn get_filetype() -> PFiles
Provided Methods§
fn from_fullpath(fullpath: PathBuf) -> ResultOf<Self::Output>
fn from_output(output: PathBuf) -> ResultOf<Self::Output>
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.