Struct postgis_diesel::types::PointConstructorError
source · pub struct PointConstructorError {
pub reason: String,
}
Expand description
Error which may be returned if point constructed without required fields or has some unexpected fields for type.
use postgis_diesel::types::{PointT, PointZ, Point, PointConstructorError};
let point = PointZ::new_point(72.0, 63.0, None, None, None);
assert!(point.is_err());
assert_eq!(Result::Err(PointConstructorError{reason:"Z is not defined, but mandatory for PointZ".to_string()}), point);
let point = Point::new_point(72.0, 63.0, None, Some(10.0), None);
assert!(point.is_err());
assert_eq!(Result::Err(PointConstructorError{reason:"unexpectedly defined Z Some(10.0) or M None for Point".to_string()}), point);
Fields§
§reason: String
Trait Implementations§
source§impl Clone for PointConstructorError
impl Clone for PointConstructorError
source§fn clone(&self) -> PointConstructorError
fn clone(&self) -> PointConstructorError
Returns a copy of the value. Read more
1.0.0 · 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 PointConstructorError
impl Debug for PointConstructorError
source§impl Display for PointConstructorError
impl Display for PointConstructorError
source§impl Error for PointConstructorError
impl Error for PointConstructorError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<PointConstructorError> for PointConstructorError
impl PartialEq<PointConstructorError> for PointConstructorError
source§fn eq(&self, other: &PointConstructorError) -> bool
fn eq(&self, other: &PointConstructorError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PointConstructorError
Auto Trait Implementations§
impl RefUnwindSafe for PointConstructorError
impl Send for PointConstructorError
impl Sync for PointConstructorError
impl Unpin for PointConstructorError
impl UnwindSafe for PointConstructorError
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: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
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>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read more