pub enum Error {
Show 19 variants
ParseFail(String, String),
AddFail(String, String),
SubFail(String, String),
MulFail(String, String),
DivFail(String, String),
RemFail(String, String),
NegFail(String, String),
ShlFail(String, String),
ShrFail(String, String),
IndexOutofBound(String, String),
InvalidIndex(String, String),
NotAnArray(String, String),
InvalidContainer(String, String),
InvalidType(String, String),
PropertyNotFound(String, String),
AppendString(String, String),
InvalidNumber(String, String),
JptrFail(String, String),
IoError(String, String),
}
Expand description
Enumeration of all possible errors that shall be returned by this package.
Refer to individual methods and functions, returning Result type, for specific error handling.
Variants
ParseFail(String, String)
Failed to parse JSON text.
AddFail(String, String)
Failed to add two Json values.
SubFail(String, String)
Failed to subract two Json values.
MulFail(String, String)
Failed to multiply two Json values.
DivFail(String, String)
Failed to divide two Json values.
RemFail(String, String)
Failed to find reminder between two Json values.
NegFail(String, String)
Failed to negate Json value.
ShlFail(String, String)
Failed to left shift Json value.
ShrFail(String, String)
Failed to right shift Json value.
IndexOutofBound(String, String)
When indexing a Json array with out of bound index.
InvalidIndex(String, String)
When attempting index an array with an invalid index.
NotAnArray(String, String)
When attempting array operation, like range, index etc.., on non-array value.
InvalidContainer(String, String)
When attempting lookup and indexing operations like, set, delete, append, index, etc.. on values that are neither array nor object.
InvalidType(String, String)
Not an expected type, arugment gives the found type.
PropertyNotFound(String, String)
When trying to lookup a Json object with missing property.
AppendString(String, String)
While appending a non string value with Json string.
InvalidNumber(String, String)
Found JSON text that looks like number, but not well formed.
JptrFail(String, String)
Failed processing json-pointer.
IoError(String, String)
std::io::Error returned by string processing API, while iterating
on crate::Jsons
stream of text.