Struct InvoiceLine
pub struct InvoiceLine { /* private fields */ }Expand description
A single invoice line.
Implementations§
§impl InvoiceLine
impl InvoiceLine
pub fn new(
description: impl AsRef<str>,
amount: Money,
) -> Result<InvoiceLine, InvoiceError>
pub fn new( description: impl AsRef<str>, amount: Money, ) -> Result<InvoiceLine, InvoiceError>
Creates an invoice line with a non-empty description.
§Errors
Returns [InvoiceError::EmptyLineDescription] when the trimmed description is empty.
pub fn description(&self) -> &str
pub fn description(&self) -> &str
Returns the line description.
Trait Implementations§
§impl Clone for InvoiceLine
impl Clone for InvoiceLine
§fn clone(&self) -> InvoiceLine
fn clone(&self) -> InvoiceLine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for InvoiceLine
impl Debug for InvoiceLine
§impl PartialEq for InvoiceLine
impl PartialEq for InvoiceLine
impl Eq for InvoiceLine
impl StructuralPartialEq for InvoiceLine
Auto Trait Implementations§
impl Freeze for InvoiceLine
impl RefUnwindSafe for InvoiceLine
impl Send for InvoiceLine
impl Sync for InvoiceLine
impl Unpin for InvoiceLine
impl UnsafeUnpin for InvoiceLine
impl UnwindSafe for InvoiceLine
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