INNER CODE UNIT · Rust

parse_main

steineggerlab/folddisco · lib/pdbtbx-cif/src/lib.rs:16

fn parse_main(input: &mut Position<'_>) -> Result<DataBlock, PDBError> {
    trim_comments_and_whitespace(input);
    parse_data_block(input)
}

/// Parse a data block, the main item of a CIF file
fn parse_data_block(input: &mut Position<'_>) -> Result<DataBlock, PDBError> {
    if start_with(input, "data_").is_none() {
        return Err(PDBError::new(
            ErrorLevel::BreakingError,
            "Data Block not opened",
            "The data block should be opened with \"data_\".",
            Context::position(input),
        ));
        
    };
    let identifier = parse_identifier(input);
    let mut block = DataBlock {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…