ToFile

Trait ToFile 

Source
pub trait ToFile {
    // Required method
    fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>;
}

Required Methods§

Source

fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Write string content to an external file.

Note: Replaces the current file content if the file already exists.

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 ToFile for str

Source§

fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Source§

impl ToFile for Molecule

Source§

fn to_file<T: AsRef<Path>>(&self, path: T) -> Result<()>

Save molecule to an external file

Implementors§