pub enum CheckedTomlError {
NestingTooDeep {
depth: usize,
},
Syntax(Error),
}Expand description
Error returned by parse_toml_checked: either content nests deeper than
MAX_TOML_NESTING_DEPTH or toml-span itself rejects it as invalid syntax.
Distinct from a bare toml_span::Error so callers can branch on “too deep” vs.
“malformed” without string-matching a message.
Variants§
NestingTooDeep
content exceeded MAX_TOML_NESTING_DEPTH before toml-span ever parsed it.
Fields
§
depth: usizeThe nesting depth reached the instant it exceeded MAX_TOML_NESTING_DEPTH.
Syntax(Error)
content passed the depth guard but toml-span rejected it as invalid TOML.
Trait Implementations§
Source§impl Debug for CheckedTomlError
impl Debug for CheckedTomlError
Source§impl Display for CheckedTomlError
impl Display for CheckedTomlError
Source§impl Error for CheckedTomlError
impl Error for CheckedTomlError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CheckedTomlError
impl RefUnwindSafe for CheckedTomlError
impl Send for CheckedTomlError
impl Sync for CheckedTomlError
impl Unpin for CheckedTomlError
impl UnsafeUnpin for CheckedTomlError
impl UnwindSafe for CheckedTomlError
Blanket Implementations§
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
Mutably borrows from an owned value. Read more