pub enum CheckedTomlError {
NestingTooDeep {
guard: TomlDepthGuard,
},
Syntax(Error),
}Expand description
Error returned by parse_toml_checked: either content nests too deeply
(rejected by the MAX_TOML_NESTING_DEPTH pre-scan or by toml-span’s
native depth limit) or toml-span 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 nests too deeply; guard records which layer rejected it.
Fields
§
guard: TomlDepthGuardThe layer that rejected the input, with its reached depth when known.
Syntax(Error)
content passed the depth guards but toml-span rejected it as invalid TOML.
Implementations§
Source§impl CheckedTomlError
impl CheckedTomlError
Sourcepub const fn kind(&self) -> ParseFailureKind
pub const fn kind(&self) -> ParseFailureKind
The ParseFailureKind this error maps to.
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 Forget for CheckedTomlError
impl Freeze for CheckedTomlError
impl Move 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