pub struct Decode<T: FromWkb> {
pub geometry: Option<T>,
}
Expand description
Decode from WKB
Fields§
§geometry: Option<T>
Decoded geometry. None
for NULL
value.
Trait Implementations§
source§impl<T: FromWkb + Sized> FromSql<'_> for Decode<T>
impl<T: FromWkb + Sized> FromSql<'_> for Decode<T>
source§fn from_sql(
_ty: &Type,
raw: &[u8]
) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql( _ty: &Type, raw: &[u8] ) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn from_sql_null(_ty: &Type) -> Result<Self, Box<dyn Error + Sync + Send>>
fn from_sql_null(_ty: &Type) -> Result<Self, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a
NULL
SQL value. Read moresource§impl<T: FromWkb + Sized> PgHasArrayType for Decode<T>
impl<T: FromWkb + Sized> PgHasArrayType for Decode<T>
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
Auto Trait Implementations§
impl<T> Freeze for Decode<T>where
T: Freeze,
impl<T> RefUnwindSafe for Decode<T>where
T: RefUnwindSafe,
impl<T> Send for Decode<T>where
T: Send,
impl<T> Sync for Decode<T>where
T: Sync,
impl<T> Unpin for Decode<T>where
T: Unpin,
impl<T> UnwindSafe for Decode<T>where
T: UnwindSafe,
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> 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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§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