[][src]Trait gchemol::io::prelude::StringIO

pub trait StringIO {
    fn format_as<S>(&self, fmt: S) -> Result<String, Error>
    where
        S: AsRef<str>
;
fn parse_from<R, S>(s: R, fmt: S) -> Result<Molecule, Error>
    where
        R: Read + Seek,
        S: AsRef<str>
; fn from_str<S>(s: &str, fmt: S) -> Result<Molecule, Error>
    where
        S: AsRef<str>
, { ... } }

Required methods

fn format_as<S>(&self, fmt: S) -> Result<String, Error> where
    S: AsRef<str>, 

Format molecule as string in specific fmt.

fn parse_from<R, S>(s: R, fmt: S) -> Result<Molecule, Error> where
    R: Read + Seek,
    S: AsRef<str>, 

Parse molecule from string in specific fmt.

Loading content...

Provided methods

fn from_str<S>(s: &str, fmt: S) -> Result<Molecule, Error> where
    S: AsRef<str>, 

Loading content...

Implementors

impl StringIO for Molecule[src]

fn format_as<S>(&self, fmt: S) -> Result<String, Error> where
    S: AsRef<str>, 
[src]

Format molecule as string in specific molecular file format. Return error if cannot format molecule in fmt.

fn parse_from<R, S>(s: R, fmt: S) -> Result<Molecule, Error> where
    R: Read + Seek,
    S: AsRef<str>, 
[src]

construct molecule from string in specific molecular file format.

Loading content...