pub struct ItemPropertiesContainer { /* private fields */ }Implementations§
Source§impl ItemPropertiesContainer
impl ItemPropertiesContainer
pub fn new() -> Self
pub fn get_properties_types(&self) -> HashSet<ItemPropertiesType>
pub fn add_properties(&mut self, properties: ItemProperties)
pub fn remove_properties(&mut self, properties_type: ItemPropertiesType)
pub fn with_stackable(self, count: u64) -> Self
pub fn with_usage(self, count: u64) -> Self
Trait Implementations§
Source§impl<'__expr> AsExpression<Jsonb> for &'__expr ItemPropertiesContainer
impl<'__expr> AsExpression<Jsonb> for &'__expr ItemPropertiesContainer
Source§type Expression = Bound<Jsonb, &'__expr ItemPropertiesContainer>
type Expression = Bound<Jsonb, &'__expr ItemPropertiesContainer>
The expression being returned
Source§fn as_expression(self) -> <Self as AsExpression<Jsonb>>::Expression
fn as_expression(self) -> <Self as AsExpression<Jsonb>>::Expression
Perform the conversion
Source§impl AsExpression<Jsonb> for ItemPropertiesContainer
impl AsExpression<Jsonb> for ItemPropertiesContainer
Source§type Expression = Bound<Jsonb, ItemPropertiesContainer>
type Expression = Bound<Jsonb, ItemPropertiesContainer>
The expression being returned
Source§fn as_expression(self) -> <Self as AsExpression<Jsonb>>::Expression
fn as_expression(self) -> <Self as AsExpression<Jsonb>>::Expression
Perform the conversion
Source§impl<'__expr> AsExpression<Nullable<Jsonb>> for &'__expr ItemPropertiesContainer
impl<'__expr> AsExpression<Nullable<Jsonb>> for &'__expr ItemPropertiesContainer
Source§type Expression = Bound<Nullable<Jsonb>, &'__expr ItemPropertiesContainer>
type Expression = Bound<Nullable<Jsonb>, &'__expr ItemPropertiesContainer>
The expression being returned
Source§fn as_expression(self) -> <Self as AsExpression<Nullable<Jsonb>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Nullable<Jsonb>>>::Expression
Perform the conversion
Source§impl AsExpression<Nullable<Jsonb>> for ItemPropertiesContainer
impl AsExpression<Nullable<Jsonb>> for ItemPropertiesContainer
Source§type Expression = Bound<Nullable<Jsonb>, ItemPropertiesContainer>
type Expression = Bound<Nullable<Jsonb>, ItemPropertiesContainer>
The expression being returned
Source§fn as_expression(self) -> <Self as AsExpression<Nullable<Jsonb>>>::Expression
fn as_expression(self) -> <Self as AsExpression<Nullable<Jsonb>>>::Expression
Perform the conversion
Source§impl Clone for ItemPropertiesContainer
impl Clone for ItemPropertiesContainer
Source§fn clone(&self) -> ItemPropertiesContainer
fn clone(&self) -> ItemPropertiesContainer
Returns a duplicate 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 ItemPropertiesContainer
impl Debug for ItemPropertiesContainer
Source§impl Default for ItemPropertiesContainer
impl Default for ItemPropertiesContainer
Source§fn default() -> ItemPropertiesContainer
fn default() -> ItemPropertiesContainer
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ItemPropertiesContainer
impl<'de> Deserialize<'de> for ItemPropertiesContainer
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 ItemPropertiesContainerInterface for ItemPropertiesContainer
impl ItemPropertiesContainerInterface for ItemPropertiesContainer
fn get_properties(&self) -> &HashMap<ItemPropertiesType, ItemProperties>
fn get_properties_mut( &mut self, ) -> &mut HashMap<ItemPropertiesType, ItemProperties>
fn get_stackable_properties(&self) -> Option<&StackableComponent>
fn get_stackable_properties_mut(&mut self) -> Option<&mut StackableComponent>
fn get_usage_properties(&self) -> Option<&UsageComponent>
fn get_usage_properties_mut(&mut self) -> Option<&mut UsageComponent>
fn set_count(&mut self, count: u64)
fn is_stackable(&self) -> bool
fn has_usage(&self) -> bool
fn get_count(&self) -> Option<u64>
fn get_times_used(&self) -> Option<u64>
fn on_use(&mut self, times: u64)
fn on_add(&mut self, amount: u64)
fn on_remove(&mut self, amount: u64)
fn should_consume(&self) -> bool
Source§impl PartialEq for ItemPropertiesContainer
impl PartialEq for ItemPropertiesContainer
Source§impl<__DB, __ST> Queryable<__ST, __DB> for ItemPropertiesContainer
impl<__DB, __ST> Queryable<__ST, __DB> for ItemPropertiesContainer
Source§impl Serialize for ItemPropertiesContainer
impl Serialize for ItemPropertiesContainer
impl StructuralPartialEq for ItemPropertiesContainer
Auto Trait Implementations§
impl Freeze for ItemPropertiesContainer
impl RefUnwindSafe for ItemPropertiesContainer
impl Send for ItemPropertiesContainer
impl Sync for ItemPropertiesContainer
impl Unpin for ItemPropertiesContainer
impl UnwindSafe for ItemPropertiesContainer
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§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
Source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for T
Source§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, 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.