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)>
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 PointConstructorError
impl PartialEq for PointConstructorError
impl StructuralPartialEq for PointConstructorError
Auto Trait Implementations§
impl Freeze for PointConstructorError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more