[][src]Function pdbtbx::parse

pub fn parse<T>(
    input: BufReader<T>,
    context: Context,
    level: StrictnessLevel
) -> Result<(PDB, Vec<PDBError>), Vec<PDBError>> where
    T: Read

Parse the input stream into a PDB struct. To allow for direct streaming from sources, like from RCSB.org. Returns an PDBError when it found a BreakingError. Otherwise it returns the PDB with all errors/warnings found while parsing it.

Arguments

  • input - the input stream
  • context - the context of the full stream, to place error messages correctly, for files this is Context::show(filename).
  • level - the strictness level to operate in. If errors are generated which are breaking in the given level the parsing will fail.