Trait FreebyAble

Source
pub trait FreebyAble {
    // Required methods
    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 decrement(&mut self);
    fn get_budget_cents_left(&self) -> u64;
    fn remove_budget_by(&mut self, value: u64);
    fn left(&self) -> u16;

    // Provided methods
    fn is_open(&self) -> bool { ... }
    fn allows(&self, item_to_allow: &Item) -> bool { ... }
}

Required Methods§

Source

fn message(&self) -> &str

Source

fn get_id(&self) -> u64

Source

fn get_donor(&self) -> u32

Source

fn allowed_categories(&self) -> &[String]

Source

fn allowed_items(&self) -> &[u32]

Source

fn decrement(&mut self)

Source

fn get_budget_cents_left(&self) -> u64

Source

fn remove_budget_by(&mut self, value: u64)

Source

fn left(&self) -> u16

Provided Methods§

Source

fn is_open(&self) -> bool

Source

fn allows(&self, item_to_allow: &Item) -> bool

Implementors§