#[non_exhaustive]pub enum StatementContentError {
UnknownId {
id: String,
path: String,
node: Value,
},
ArgumentCount {
id: String,
min: usize,
max: Option<usize>,
supplied: usize,
path: String,
node: Value,
},
InternalSentinel {
id: String,
path: String,
node: Value,
},
Unrepresentable {
reason: String,
path: String,
node: Value,
},
Spans {
key: String,
path: String,
node: Value,
},
}Expand description
Why statement_from_content refused a node. Every variant names the
offending node by its JSON pointer from the statement ("" is the
statement itself) and a copy of the node.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
UnknownId
A call id the catalog (and the format’s reserved ids) does not name.
ArgumentCount
A call whose argument count the catalog signature does not accept.
max is None for a variadic signature.
InternalSentinel
An internal name (the ambiguous-enum helper) the format never exposes.
Unrepresentable
A node that forms no statement or value of the format.
Spans
A node carrying spans, which are output-only.
Implementations§
Trait Implementations§
Source§impl Clone for StatementContentError
impl Clone for StatementContentError
Source§impl Debug for StatementContentError
impl Debug for StatementContentError
Source§impl Display for StatementContentError
impl Display for StatementContentError
Source§impl Error for StatementContentError
impl Error for StatementContentError
1.30.0 · 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()
Source§impl PartialEq for StatementContentError
impl PartialEq for StatementContentError
impl StructuralPartialEq for StatementContentError
Auto Trait Implementations§
impl Freeze for StatementContentError
impl RefUnwindSafe for StatementContentError
impl Send for StatementContentError
impl Sync for StatementContentError
impl Unpin for StatementContentError
impl UnsafeUnpin for StatementContentError
impl UnwindSafe for StatementContentError
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