MG46NYACGKHTJ5V6NLPDGKQSETQQNCOGP7TDS4KPJDJFNPKWEFJAC
NSWL54NMMYELYDQNRFAO7S6GBFDW6MDJ5TM2EYMK2VX336DGACHQC
CLAGB2U4Y2KVXCF6FXVS6JVXDH7VZLSH4DJKXIDI6ZGIIKTIVNMQC
D6UTHZA4XNAR2PTG4YEZFNNH3OTSNOWGDSVBYDRE5R2YSV7MPN6AC
SJ6AFVZL5HEXG5ZUV5STIGGIGLU56WGAQCSZBFFHQOVHAILBOS2QC
QRIJE4AQWN7A7O2CO7FXRV4FXZ5RHONQKRGHYXAD7WSECJYK2MFAC
5S4MZHL5SO3D3M2CNQESORNJ47QCX7X7SPTO3K63VDXMITYMRZBQC
enum Error {
#[snafu(display("encountered unsupported directive while indexing: {directive:?}"))]
IndexingDirective {
backtrace: Backtrace,
directive: Directive,
},
#[snafu(display("error while pretty printing directives for key {index:?} to {file}"))]
PrettyPrinting {
backtrace: Backtrace,
file: Utf8PathBuf,
index: DirectiveIndex,
source: io::Error,
},
}
pub struct Error(InnerError);
let pretty_printer_config = match self.config.pretty_printer {
config::PrettyPrinterConfig::GloballyDerived => Some(
beancount_pretty_printer::Config::derive_from_directives(&directives),
),
config::PrettyPrinterConfig::LocallyDerived => None,
config::PrettyPrinterConfig::Static(config) => Some(config),
};
}
#[derive(Debug, Snafu)]
enum InnerError {
#[snafu(display("encountered unsupported directive while indexing: {directive:?}"))]
IndexingDirective {
backtrace: Backtrace,
directive: Directive,
},
#[snafu(display("error while pretty printing directives for key {index:?} to {file}"))]
PrettyPrinting {
backtrace: Backtrace,
file: Utf8PathBuf,
index: DirectiveIndex,
source: io::Error,
},
type Result<T, E = Error> = std::result::Result<T, E>;