pub struct DimensionCost {
pub dimension: TariffDimensionType,
pub measured: Number,
pub billed: Number,
pub cost: Number,
pub vat: Number,
pub segments: Vec<PricedSegment>,
}Available on crate feature
tariffs only.Expand description
What one dimension of a session cost, and how that was arrived at.
Fields§
§dimension: TariffDimensionTypeThe dimension priced.
measured: NumberThe quantity actually measured, before step_size was applied.
billed: NumberThe quantity billed, after step_size was applied.
cost: NumberThe cost, excluding any VAT named on the price components.
vat: NumberThe VAT owed on that cost.
segments: Vec<PricedSegment>Each stretch of the session that was priced at one rate.
Implementations§
Source§impl DimensionCost
impl DimensionCost
Sourcepub fn cost_with_vat(&self) -> Number
pub fn cost_with_vat(&self) -> Number
The cost including VAT.
Sourcepub fn was_quantised(&self) -> bool
pub fn was_quantised(&self) -> bool
Whether step_size changed the billed quantity.
Trait Implementations§
Source§impl Clone for DimensionCost
impl Clone for DimensionCost
Source§fn clone(&self) -> DimensionCost
fn clone(&self) -> DimensionCost
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DimensionCost
impl Debug for DimensionCost
Source§impl<'de> Deserialize<'de> for DimensionCost
impl<'de> Deserialize<'de> for DimensionCost
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 PartialEq for DimensionCost
impl PartialEq for DimensionCost
Source§impl Serialize for DimensionCost
impl Serialize for DimensionCost
impl StructuralPartialEq for DimensionCost
Auto Trait Implementations§
impl Freeze for DimensionCost
impl RefUnwindSafe for DimensionCost
impl Send for DimensionCost
impl Sync for DimensionCost
impl Unpin for DimensionCost
impl UnsafeUnpin for DimensionCost
impl UnwindSafe for DimensionCost
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