Struct eversal_lib::model::SystemDb
source · pub struct SystemDb {Show 26 fields
pub region_id: i32,
pub constellation_id: i32,
pub system_id: i32,
pub system_name: String,
pub x: f32,
pub y: f32,
pub z: f32,
pub x_min: f32,
pub x_max: f32,
pub y_min: f32,
pub y_max: f32,
pub z_min: f32,
pub z_max: f32,
pub luminosity: f32,
pub border: bool,
pub fringe: bool,
pub corridor: bool,
pub hub: bool,
pub international: bool,
pub regional: bool,
pub constellation: Option<bool>,
pub security: f32,
pub faction_id: Option<i32>,
pub radius: f32,
pub sun_type_id: Option<i32>,
pub security_class: Option<String>,
}Fields§
§region_id: i32§constellation_id: i32§system_id: i32§system_name: String§x: f32§y: f32§z: f32§x_min: f32§x_max: f32§y_min: f32§y_max: f32§z_min: f32§z_max: f32§luminosity: f32§border: bool§fringe: bool§corridor: bool§hub: bool§international: bool§regional: bool§constellation: Option<bool>§security: f32§faction_id: Option<i32>§radius: f32§sun_type_id: Option<i32>§security_class: Option<String>Implementations§
source§impl SystemDb
impl SystemDb
pub async fn get_by_id(system_id: i32) -> DbResult<Option<Self>>
pub async fn count(filter: &SystemFilter) -> DbResult<i64>
pub async fn get(filter: &SystemFilter) -> DbResult<Vec<Self>>
pub async fn insert(&self) -> DbResult<()>
pub async fn insert_multiple(systems: &Vec<Self>) -> DbResult<()>
pub async fn update(&self) -> DbResult<()>
pub async fn delete(system_id: i64) -> DbResult<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for SystemDb
impl<'de> Deserialize<'de> for SystemDb
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, R: Row> FromRow<'a, R> for SystemDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
f32: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Option<bool>: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for SystemDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
f32: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Option<bool>: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for SystemDb
impl RefUnwindSafe for SystemDb
impl Send for SystemDb
impl Sync for SystemDb
impl Unpin for SystemDb
impl UnwindSafe for SystemDb
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 more