pub struct SoilTexture {
pub id: Uuid,
pub layer_id: Uuid,
pub soil_texture: SoilTextureEnum,
pub geometry: Polygon<Point>,
pub add_date: Option<NaiveDate>,
pub remove_date: Option<NaiveDate>,
pub notes: String,
}
Expand description
The SoilTexture
entity.
Fields§
§id: Uuid
The id of the shading.
layer_id: Uuid
The plant layer the shadings is on.
soil_texture: SoilTextureEnum
The kind of soil texture.
geometry: Polygon<Point>
The position of the shade on the map.
add_date: Option<NaiveDate>
The date the shading was added to the map. If None, the shading always existed.
remove_date: Option<NaiveDate>
The date the shading was removed from the map. If None, the shading is still on the map.
notes: String
Markdown notes
Trait Implementations§
source§impl Clone for SoilTexture
impl Clone for SoilTexture
source§fn clone(&self) -> SoilTexture
fn clone(&self) -> SoilTexture
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 SoilTexture
impl Debug for SoilTexture
source§impl From<SoilTexture> for AreaDto
impl From<SoilTexture> for AreaDto
source§fn from(entity: SoilTexture) -> Self
fn from(entity: SoilTexture) -> Self
Converts to this type from the input type.
source§impl HasTable for SoilTexture
impl HasTable for SoilTexture
source§impl<'ident> Identifiable for &'ident SoilTexture
impl<'ident> Identifiable for &'ident SoilTexture
source§impl<'insert> Insertable<table> for &'insert SoilTexture
impl<'insert> Insertable<table> for &'insert SoilTexture
§type Values = <(Option<Grouped<Eq<id, <&'insert Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <&'insert Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<soil_texture, <&'insert SoilTextureEnum as AsExpression<<soil_texture as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<geometry, <&'insert Polygon<Point> as AsExpression<<geometry as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <&'insert NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <&'insert NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<notes, <&'insert String as AsExpression<<notes as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <&'insert Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <&'insert Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<soil_texture, <&'insert SoilTextureEnum as AsExpression<<soil_texture as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<geometry, <&'insert Polygon<Point> as AsExpression<<geometry as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <&'insert NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <&'insert NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<notes, <&'insert String as AsExpression<<notes as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn values(
self,
) -> <(Option<Eq<id, &'insert Uuid>>, Option<Eq<layer_id, &'insert Uuid>>, Option<Eq<soil_texture, &'insert SoilTextureEnum>>, Option<Eq<geometry, &'insert Polygon<Point>>>, Option<Eq<add_date, &'insert NaiveDate>>, Option<Eq<remove_date, &'insert NaiveDate>>, Option<Eq<notes, &'insert String>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, &'insert Uuid>>, Option<Eq<layer_id, &'insert Uuid>>, Option<Eq<soil_texture, &'insert SoilTextureEnum>>, Option<Eq<geometry, &'insert Polygon<Point>>>, Option<Eq<add_date, &'insert NaiveDate>>, Option<Eq<remove_date, &'insert NaiveDate>>, Option<Eq<notes, &'insert String>>) as Insertable<table>>::Values
Construct
Self::Values
Read moresource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self
into a given table. Read moresource§impl Insertable<table> for SoilTexture
impl Insertable<table> for SoilTexture
§type Values = <(Option<Grouped<Eq<id, <Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<soil_texture, <SoilTextureEnum as AsExpression<<soil_texture as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<geometry, <Polygon<Point> as AsExpression<<geometry as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<notes, <String as AsExpression<<notes as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
type Values = <(Option<Grouped<Eq<id, <Uuid as AsExpression<<id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<layer_id, <Uuid as AsExpression<<layer_id as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<soil_texture, <SoilTextureEnum as AsExpression<<soil_texture as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<geometry, <Polygon<Point> as AsExpression<<geometry as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<add_date, <NaiveDate as AsExpression<<add_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<remove_date, <NaiveDate as AsExpression<<remove_date as Expression>::SqlType>>::Expression>>>, Option<Grouped<Eq<notes, <String as AsExpression<<notes as Expression>::SqlType>>::Expression>>>) as Insertable<table>>::Values
The
VALUES
clause to insert these records Read moresource§fn values(
self,
) -> <(Option<Eq<id, Uuid>>, Option<Eq<layer_id, Uuid>>, Option<Eq<soil_texture, SoilTextureEnum>>, Option<Eq<geometry, Polygon<Point>>>, Option<Eq<add_date, NaiveDate>>, Option<Eq<remove_date, NaiveDate>>, Option<Eq<notes, String>>) as Insertable<table>>::Values
fn values( self, ) -> <(Option<Eq<id, Uuid>>, Option<Eq<layer_id, Uuid>>, Option<Eq<soil_texture, SoilTextureEnum>>, Option<Eq<geometry, Polygon<Point>>>, Option<Eq<add_date, NaiveDate>>, Option<Eq<remove_date, NaiveDate>>, Option<Eq<notes, String>>) as Insertable<table>>::Values
Construct
Self::Values
Read moresource§fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
fn insert_into(self, table: T) -> InsertStatement<T, Self::Values>
Insert
self
into a given table. Read moresource§impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6), __DB> for SoilTexturewhere
(Uuid, Uuid, SoilTextureEnum, Polygon<Point>, Option<NaiveDate>, Option<NaiveDate>, String): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6), __DB>,
impl<__DB: Backend, __ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6> Queryable<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6), __DB> for SoilTexturewhere
(Uuid, Uuid, SoilTextureEnum, Polygon<Point>, Option<NaiveDate>, Option<NaiveDate>, String): FromStaticSqlRow<(__ST0, __ST1, __ST2, __ST3, __ST4, __ST5, __ST6), __DB>,
impl UndecoratedInsertRecord<table> for SoilTexture
Auto Trait Implementations§
impl Freeze for SoilTexture
impl RefUnwindSafe for SoilTexture
impl Send for SoilTexture
impl Sync for SoilTexture
impl Unpin for SoilTexture
impl UnwindSafe for SoilTexture
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 moresource§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn,
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn, ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
Executes the given command, returning the number of rows affected. Read more
source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn,
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
Runs the command, and returns the affected row. Read more
source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Runs the command, returning an
Vec
with the affected rows. Read moresource§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn,
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn, ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
Attempts to load a single record. Read more
source§impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
impl<T, ST, DB> StaticallySizedRow<ST, DB> for T
source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.