FromFile

Trait FromFile 

Source
pub trait FromFile: Sized {
    // Required method
    fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>;
}

Required Methods§

Source

fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>

Return content of text file in string.

Do not use this to read large file.

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.

Implementations on Foreign Types§

Source§

impl FromFile for String

Source§

fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>

Source§

impl FromFile for Molecule

Source§

fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>

Construct molecule from external text file

Implementors§