#[non_exhaustive]pub enum GroundTermEncodingError {
IntegerOutOfRange {
expected: ScalarType,
value: i64,
},
InvalidBooleanInteger {
value: i64,
},
InvalidBooleanSymbol {
symbol: String,
},
Variable {
name: String,
},
Anonymous,
Aggregate,
TypeMismatch {
expected: ScalarType,
actual: Term,
},
}Expand description
A structured failure produced while encoding a ground term for a scalar column.
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.
IntegerOutOfRange
An integer cannot be represented by the requested scalar type.
Fields
§
expected: ScalarTypeRequested scalar type.
InvalidBooleanInteger
A boolean integer was neither zero nor one.
InvalidBooleanSymbol
A boolean symbol was neither true nor false.
Variable
A fact contained a named variable instead of a ground term.
Anonymous
A fact contained an anonymous wildcard instead of a ground term.
Aggregate
A fact contained an aggregate expression instead of a ground term.
TypeMismatch
The term form is not supported by the requested scalar type.
Trait Implementations§
Source§impl Clone for GroundTermEncodingError
impl Clone for GroundTermEncodingError
Source§fn clone(&self) -> GroundTermEncodingError
fn clone(&self) -> GroundTermEncodingError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GroundTermEncodingError
impl Debug for GroundTermEncodingError
Source§impl Display for GroundTermEncodingError
impl Display for GroundTermEncodingError
Source§impl Error for GroundTermEncodingError
impl Error for GroundTermEncodingError
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 GroundTermEncodingError
impl PartialEq for GroundTermEncodingError
Source§fn eq(&self, other: &GroundTermEncodingError) -> bool
fn eq(&self, other: &GroundTermEncodingError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GroundTermEncodingError
Auto Trait Implementations§
impl Freeze for GroundTermEncodingError
impl RefUnwindSafe for GroundTermEncodingError
impl Send for GroundTermEncodingError
impl Sync for GroundTermEncodingError
impl Unpin for GroundTermEncodingError
impl UnsafeUnpin for GroundTermEncodingError
impl UnwindSafe for GroundTermEncodingError
Blanket Implementations§
impl<T> Allocation for T
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