pub enum Freeby {
FFA {
id: u64,
allowed_categories: Vec<String>,
allowed_drinks: Vec<u32>,
allowed_number_total: u16,
allowed_number_used: u16,
text_message: String,
created_timestamp: i64,
donor: u32,
},
Transfer {
id: u64,
cents_worth_total: u64,
cents_worth_used: u64,
text_message: String,
created_timestamp: i64,
donor: u32,
recipient: u32,
},
Classic {
id: u64,
allowed_categories: Vec<String>,
allowed_drinks: Vec<u32>,
allowed_number_total: u16,
allowed_number_used: u16,
text_message: String,
created_timestamp: i64,
donor: u32,
recipient: u32,
},
}Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Freeby
impl<'de> Deserialize<'de> for Freeby
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 FreebyAble for Freeby
impl FreebyAble for Freeby
fn message(&self) -> &str
fn get_id(&self) -> u64
fn get_donor(&self) -> u32
fn allowed_categories(&self) -> &[String]
fn allowed_items(&self) -> &[u32]
fn left(&self) -> u16
fn decrement(&mut self)
fn get_budget_cents_left(&self) -> u64
fn remove_budget_by(&mut self, value: u64)
fn is_open(&self) -> bool
fn allows(&self, item_to_allow: &Item) -> bool
Source§impl TypeScriptifyTrait for Freeby
impl TypeScriptifyTrait for Freeby
fn type_script_ify() -> String
Auto Trait Implementations§
impl Freeze for Freeby
impl RefUnwindSafe for Freeby
impl Send for Freeby
impl Sync for Freeby
impl Unpin for Freeby
impl UnwindSafe for Freeby
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