[][src]Struct bill::ItemList

pub struct ItemList<P> { /* fields omitted */ }

A list of BillItems, implements summing methods.

Methods

impl<P: BillProduct> ItemList<P>
[src]

pub fn from_vec(list: Vec<BillItem<P>>) -> Self
[src]

pub fn new() -> Self
[src]

pub fn gross_sum(&self) -> Money
[src]

pub fn tax_sum(&self) -> Money
[src]

this assumes that all items have the same tax

pub fn net_sum(&self) -> Money
[src]

pub fn push(&mut self, item: BillItem<P>)
[src]

Trait Implementations

impl<P: Debug> Debug for ItemList<P>
[src]

impl<P: BillProduct> Deref for ItemList<P>
[src]

type Target = [BillItem<P>]

The resulting type after dereferencing.

Auto Trait Implementations

impl<P> Send for ItemList<P> where
    P: Send

impl<P> Sync for ItemList<P> where
    P: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

πŸ”¬ This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

πŸ”¬ This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]