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.

Object Safety§

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§