pub enum TomlErrorKind {
Parse(String),
UnexpectedType {
expected: &'static str,
got: &'static str,
},
UnexpectedEof {
expected: &'static str,
},
UnknownField {
field: String,
expected: Vec<&'static str>,
suggestion: Option<&'static str>,
},
MissingField {
field: &'static str,
table_start: Option<Span>,
table_end: Option<Span>,
},
InvalidValue {
message: String,
},
Reflect(ReflectError),
NumberOutOfRange {
value: String,
target_type: &'static str,
},
DuplicateKey {
key: String,
},
InvalidUtf8(Utf8Error),
Solver(String),
Serialize(String),
}Expand description
Specific error kinds for TOML operations
Variants§
Parse(String)
Parse error from toml_parser
UnexpectedType
Unexpected value type
UnexpectedEof
Unexpected end of input
UnknownField
Unknown field in table
Fields
MissingField
Missing required field
Fields
InvalidValue
Invalid value for type
Reflect(ReflectError)
Reflection error from facet-reflect
NumberOutOfRange
Number out of range
Fields
DuplicateKey
Duplicate key in table
InvalidUtf8(Utf8Error)
Invalid UTF-8 in string
Solver(String)
Solver error (for flattened types)
Serialize(String)
Serialization error
Implementations§
Trait Implementations§
Source§impl Clone for TomlErrorKind
impl Clone for TomlErrorKind
Source§fn clone(&self) -> TomlErrorKind
fn clone(&self) -> TomlErrorKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TomlErrorKind
impl Debug for TomlErrorKind
Auto Trait Implementations§
impl Freeze for TomlErrorKind
impl RefUnwindSafe for TomlErrorKind
impl Send for TomlErrorKind
impl Sync for TomlErrorKind
impl Unpin for TomlErrorKind
impl UnwindSafe for TomlErrorKind
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