Struct eversal_lib::model::RegionDb
source · pub struct RegionDb {}Fields§
§region_id: i32§region_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§faction_id: Option<i32>§nebula: i32§radius: Option<f32>Implementations§
source§impl RegionDb
impl RegionDb
pub async fn get_by_id(region_id: i32) -> DbResult<Option<Self>>
pub async fn count(filter: &RegionFilter) -> DbResult<i64>
pub async fn get(filter: &RegionFilter) -> DbResult<Vec<Self>>
pub async fn insert(&self) -> DbResult<()>
pub async fn insert_multiple(regions: &Vec<RegionDb>) -> DbResult<()>
pub async fn update(&self) -> DbResult<()>
pub async fn delete(region_id: i64) -> DbResult<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for RegionDb
impl<'de> Deserialize<'de> for RegionDb
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
Auto Trait Implementations§
impl Freeze for RegionDb
impl RefUnwindSafe for RegionDb
impl Send for RegionDb
impl Sync for RegionDb
impl Unpin for RegionDb
impl UnwindSafe for RegionDb
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