pub enum DecodeError {
CanonicalRecordsMissing {
rows: usize,
},
LengthMismatch {
what: &'static str,
expected: usize,
found: usize,
},
EmptyRecord {
index: usize,
},
Malformed {
index: usize,
reason: String,
},
NotAnObject {
index: usize,
found: &'static str,
},
MissingField {
field: String,
},
NullField {
field: String,
},
UnexpectedType {
field: String,
expected: &'static str,
found: &'static str,
},
NotAnExactInteger {
field: String,
value: String,
},
IntegerOutOfRange {
field: String,
width: &'static str,
value: String,
},
InvalidBase64 {
field: String,
reason: String,
},
}Expand description
Why a RecordSet or one of its fields could not be decoded.
Every variant names the record index or field, so a failure points at the data rather than at this module.
Variants§
CanonicalRecordsMissing
The set carries compatibility rows but no canonical records_json.
LengthMismatch
A parallel array disagreed with records_json about the record count.
EmptyRecord
A record body was zero bytes.
Malformed
A record body was not valid JSON.
NotAnObject
A record body was valid JSON but not a JSON object.
MissingField
The field was not in the returned projection.
NullField
The field was present and SQL NULL.
UnexpectedType
The field held a different JSON kind than the accessor asked for.
NotAnExactInteger
A numeric field was not an exact integer of the requested width — fractional, or beyond what the type can hold.
IntegerOutOfRange
An integer was exact but outside the narrower requested width.
InvalidBase64
A binary field was not decodable base64.
Trait Implementations§
Source§impl Clone for DecodeError
impl Clone for DecodeError
Source§impl Debug for DecodeError
impl Debug for DecodeError
Source§impl Display for DecodeError
impl Display for DecodeError
impl Eq for DecodeError
Source§impl Error for DecodeError
impl Error for DecodeError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<DecodeError> for SelectError
impl From<DecodeError> for SelectError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Source§impl PartialEq for DecodeError
impl PartialEq for DecodeError
impl StructuralPartialEq for DecodeError
Auto Trait Implementations§
impl Forget for DecodeError
impl Freeze for DecodeError
impl Move for DecodeError
impl RefUnwindSafe for DecodeError
impl Send for DecodeError
impl Sync for DecodeError
impl Unpin for DecodeError
impl UnsafeUnpin for DecodeError
impl UnwindSafe for DecodeError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request