pub struct PlantingDto {Show 19 fields
pub id: Uuid,
pub layer_id: Uuid,
pub plant_id: i32,
pub created_at: Option<NaiveDateTime>,
pub modified_at: Option<NaiveDateTime>,
pub created_by: Option<Uuid>,
pub modified_by: Option<Uuid>,
pub x: i32,
pub y: i32,
pub size_x: i32,
pub size_y: i32,
pub height: Option<i32>,
pub rotation: f32,
pub add_date: Option<NaiveDate>,
pub remove_date: Option<NaiveDate>,
pub seed_id: Option<i32>,
pub additional_name: Option<String>,
pub is_area: bool,
pub notes: String,
}Expand description
Represents a plant on a map. E.g. a user selects a plant from the search results and plants it on the map.
Fields§
§id: UuidThe id of the planting.
layer_id: UuidThe plant layer the plantings is on.
plant_id: i32The plant that is planted.
created_at: Option<NaiveDateTime>The actual time the planting was added to the database. This is read-only.
modified_at: Option<NaiveDateTime>When the planting was last modified on the database. This is read-only.
created_by: Option<Uuid>The id of the user who planted the planting. This is read-only.
modified_by: Option<Uuid>The id of the last user who touched the planting. This is read-only.
x: i32The x coordinate of the position on the map.
y: i32The y coordinate of the position on the map.
size_x: i32The size of the planting on the map in x direction.
size_y: i32The size of the planting on the map in y direction.
height: Option<i32>The height of the planting in cm (z direction).
rotation: f32The rotation in degrees (0-360) of the plant on the map.
add_date: Option<NaiveDate>The date the planting was added to the map. If None, the planting always existed.
remove_date: Option<NaiveDate>The date the planting was removed from the map. If None, the planting is still on the map.
seed_id: Option<i32>Plantings may be linked with a seed.
additional_name: Option<String>Equivalent to the seed name. It is used to display the full plant name on a map even if a user does not have access to the seed.
is_area: boolIs the planting an area of plantings.
notes: StringNotes about the planting in Markdown.
Trait Implementations§
Source§impl Clone for PlantingDto
impl Clone for PlantingDto
Source§fn clone(&self) -> PlantingDto
fn clone(&self) -> PlantingDto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlantingDto
impl Debug for PlantingDto
Source§impl<'de> Deserialize<'de> for PlantingDto
impl<'de> Deserialize<'de> for PlantingDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<Planting> for PlantingDto
impl From<Planting> for PlantingDto
Source§impl Serialize for PlantingDto
impl Serialize for PlantingDto
Auto Trait Implementations§
impl Freeze for PlantingDto
impl RefUnwindSafe for PlantingDto
impl Send for PlantingDto
impl Sync for PlantingDto
impl Unpin for PlantingDto
impl UnwindSafe for PlantingDto
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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
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
&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>
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>>>
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>>>
Vec with the affected rows. Read more