pub fn path_content<P: Into<PathBuf> + AsRef<Path> + Clone>(path: P) -> Result<InputContent> {
        let content = read_to_string(&path).map_err(|e| (path.clone().into(), e))?;
        let input_content = InputContent {
            file_type: FileType::from(path.as_ref()),
            content,
            input: Input::FsPath(path.into()),
        };

        Ok(input_content)
    }
/// Get the input content of a given path
/// # Errors
///
/// Will return `Err` if file contents can't be read
Get the input content of a given path
Get the input content of a given path
pub fn path_content<P: Into<PathBuf> + AsRef<Path> + Clone>(path: P) -> Result<InputContent> {
        let content = read_to_string(&path).map_err(|e| (path.clone().into(), e))?;
        let input_content = InputContent {
            file_type: FileType::from(path.as_ref()),
            content,
            input: Input::FsPath(path.into()),
        };
        Ok(input_content)
    }
pub fn path_content < P : Into < PathBuf > + AsRef < Path > + Clone > ( path : P ) -> Result < InputContent > { let content = read_to_string ( & path ) . map_err ( | e | ( path . clone ( ) . into ( ) , e ) ) ? ; let input_content = InputContent { file_type : FileType :: from ( path . as_ref ( ) ) , content , input : Input :: FsPath ( path . into ( ) ) , } ; Ok ( input_content ) }
Get the input content of a given path
Get the input content of a given path
path
P
errors
Will return `Err` if file contents can't be read
Will return ` Err ` if file contents can ' t be read