Struct proj_billing::billing::three_party::ProviderState
[−]
[src]
pub struct ProviderState<T: Read + Write> { pub prices: Prices, // some fields omitted }
State associated with the provider
Fields
prices: Prices
The prices currently used to calculate the bill
Methods
impl<T: Read + Write> ProviderState<T>
[src]
fn new(channel: T,
prices: Prices,
keys: Keys,
params: DHParams)
-> ProviderState<T>
prices: Prices,
keys: Keys,
params: DHParams)
-> ProviderState<T>
create a new ProviderState
fn pay_bill(&mut self) -> i64
for implementing BillingProtocol
fn receive_billing_information(&mut self)
receive new billing information
fn change_prices(&mut self, prices: &Prices)
Store and send the new prices to the customer. Does not check if the prices have actually changed before sending.