refeff-io 0.2.0

FEFF file-format readers and writers (feff.inp, .dat/.bin handoffs, PAD encoding) for the refeff FEFF10 port
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Shared DMDW output parsing helpers.

use crate::error::{IoError, Result};

pub(in crate::dmdw_out) const DMDW_OUT_PATH: &str = "dmdw.out";

pub(in crate::dmdw_out) fn parse_error<T>(line: usize, message: impl Into<String>) -> Result<T> {
    Err(parse_error_value(line, message))
}

pub(in crate::dmdw_out) fn parse_error_value(line: usize, message: impl Into<String>) -> IoError {
    IoError::Parse {
        path: DMDW_OUT_PATH.into(),
        line,
        message: message.into(),
    }
}