Struct eversal_lib::model::TypeDb
source · pub struct TypeDb {Show 15 fields
pub type_id: i32,
pub group_id: i32,
pub type_name: String,
pub description: Option<String>,
pub mass: f32,
pub volume: f32,
pub capacity: f32,
pub portion_size: i32,
pub race_id: Option<i32>,
pub base_price: Option<f32>,
pub published: bool,
pub market_group_id: Option<i32>,
pub icon_id: Option<i32>,
pub sound_id: Option<i32>,
pub graphic_id: Option<i32>,
}Fields§
§type_id: i32§group_id: i32§type_name: String§description: Option<String>§mass: f32§volume: f32§capacity: f32§portion_size: i32§race_id: Option<i32>§base_price: Option<f32>§published: bool§market_group_id: Option<i32>§icon_id: Option<i32>§sound_id: Option<i32>§graphic_id: Option<i32>Implementations§
source§impl TypeDb
impl TypeDb
pub async fn get_by_id(type_id: i32) -> DbResult<Self>
pub async fn get_by_names(type_names: Vec<String>) -> DbResult<Vec<Self>>
pub async fn count(filter: &TypeFilter) -> DbResult<i64>
pub async fn get_multiple(filter: &TypeFilter) -> DbResult<Vec<Self>>
pub async fn insert(&self) -> DbResult<()>
pub async fn insert_multiple(types: &Vec<Self>) -> DbResult<()>
pub async fn update(&self) -> DbResult<()>
pub async fn delete(type_id: i32) -> DbResult<()>
Trait Implementations§
source§impl<'de> Deserialize<'de> for TypeDb
impl<'de> Deserialize<'de> for TypeDb
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 TypeDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
f32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<f32>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for TypeDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
f32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
Option<f32>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for TypeDb
impl RefUnwindSafe for TypeDb
impl Send for TypeDb
impl Sync for TypeDb
impl Unpin for TypeDb
impl UnwindSafe for TypeDb
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