pub enum GeometryError {
UnsupportedBigEndian,
WrongType,
InvalidValue,
IOError(Error),
UnsupportedGeoType,
}
Expand description
The error type for (de-)serialization and conversion errors of spatial datatypes.
Variants§
UnsupportedBigEndian
Encountered WKB data in big endian byte order.
Should not occur as MySQL only uses little endian for the spatial datatypes.
WrongType
Unexpected data type encountered (e.g. a Polygon
instead of a Point
).
InvalidValue
A conversion could not be performed because a value precondition was not fulfilled
For example data_types::BoundingBox
requires a Polygon
in a specific shape.
IOError(Error)
Deserialization failed because of a format mismatch or an I/O error happened in a underlying layer.
UnsupportedGeoType
Encountered an unsupported geometry while serializing.
Trait Implementations§
Source§impl Debug for GeometryError
impl Debug for GeometryError
Source§impl Display for GeometryError
impl Display for GeometryError
Source§impl Error for GeometryError
impl Error for GeometryError
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 From<Error> for GeometryError
impl From<Error> for GeometryError
Source§impl From<WKBReadError> for GeometryError
impl From<WKBReadError> for GeometryError
Source§fn from(e: WKBReadError) -> Self
fn from(e: WKBReadError) -> Self
Converts to this type from the input type.
Source§impl From<WKBWriteError> for GeometryError
impl From<WKBWriteError> for GeometryError
Source§fn from(e: WKBWriteError) -> Self
fn from(e: WKBWriteError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GeometryError
impl !RefUnwindSafe for GeometryError
impl Send for GeometryError
impl Sync for GeometryError
impl Unpin for GeometryError
impl !UnwindSafe for GeometryError
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
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more