pub enum LoadError {
Io {
path: PathBuf,
source: Error,
},
IncludeCycle {
cycle: Vec<String>,
},
ParseErrors {
path: PathBuf,
errors: Vec<ParseError>,
},
PathTraversal {
include_path: String,
base_dir: PathBuf,
},
Decryption {
path: PathBuf,
message: String,
},
GlobNoMatch {
pattern: String,
},
GlobError {
pattern: String,
message: String,
},
TooManyFiles {
limit: usize,
},
}Expand description
Errors that can occur during loading.
Variants§
Io
IO error reading a file.
IncludeCycle
Include cycle detected.
The Display string intentionally begins with Duplicate filename parsed: to match Python beancount’s wording for the same
condition. The pta-standards include-cycle-detection
conformance test asserts on the substring "Duplicate filename",
so this wording is load-bearing (#765). The full cycle path is
preserved in a trailing parenthetical for debuggability.
Fields
ParseErrors
Parse errors occurred.
PathTraversal
Path traversal attempt detected.
Fields
Decryption
GPG decryption failed.
GlobNoMatch
Glob pattern did not match any files.
GlobError
Glob pattern expansion failed.
TooManyFiles
More files were referenced than the 16-bit file-id space allows.
File ids are u16 on every Spanned value, so a ledger may reference at
most u16::MAX files via includes/globs. Reported as an error rather
than panicking, since load is a never-panic-on-input surface.
Trait Implementations§
Source§impl Error for LoadError
impl Error for LoadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for LoadError
impl !UnwindSafe for LoadError
impl Freeze for LoadError
impl Send for LoadError
impl Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.