pub struct DepreciationPeriod<T> {
pub period: u32,
pub depreciation_expense: T,
pub remaining_book_value: T,
}
Expand description
Depreciation Period
Represents a single period in an asset’s depreciation schedule.
An asset depreciation period includes information about the period number, the depreciation expense for the period, and the remaining book value of the asset. The book value is the original cost of the asset minus the accumulated depreciation.
§Examples
use rust_finprim::amort_dep_tax::DepreciationPeriod;
let period = DepreciationPeriod::new(1, 100.0, 900.0);
The above example creates a new DepreciationPeriod
instance with a period number of 1,
a depreciation expense of $100, and a remaining book value of $900.
Fields§
§period: u32
The period number of the depreciation schedule.
depreciation_expense: T
The depreciation expense for the period.
remaining_book_value: T
The remaining book value of the asset.
Implementations§
Source§impl<T: FloatLike> DepreciationPeriod<T>
impl<T: FloatLike> DepreciationPeriod<T>
Sourcepub fn new(
period: u32,
depreciation_expense: T,
remaining_book_value: T,
) -> Self
pub fn new( period: u32, depreciation_expense: T, remaining_book_value: T, ) -> Self
Creates a new DepreciationPeriod
instance.
§Arguments
period
: The period number of the depreciation schedule.depreciation_expense
: The depreciation expense for the period.remaining_book_value
: The remaining book value of the asset.
§Returns
A new DepreciationPeriod
instance initialized with the provided values.
Trait Implementations§
Source§impl<T: Clone> Clone for DepreciationPeriod<T>
impl<T: Clone> Clone for DepreciationPeriod<T>
Source§fn clone(&self) -> DepreciationPeriod<T>
fn clone(&self) -> DepreciationPeriod<T>
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 moreSource§impl<T: Debug> Debug for DepreciationPeriod<T>
impl<T: Debug> Debug for DepreciationPeriod<T>
Source§impl<T: Default> Default for DepreciationPeriod<T>
impl<T: Default> Default for DepreciationPeriod<T>
Source§fn default() -> DepreciationPeriod<T>
fn default() -> DepreciationPeriod<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for DepreciationPeriod<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for DepreciationPeriod<T>where
T: Deserialize<'de>,
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<T: PartialEq> PartialEq for DepreciationPeriod<T>
impl<T: PartialEq> PartialEq for DepreciationPeriod<T>
Source§impl<T> Serialize for DepreciationPeriod<T>where
T: Serialize,
impl<T> Serialize for DepreciationPeriod<T>where
T: Serialize,
impl<T: Copy> Copy for DepreciationPeriod<T>
impl<T: Eq> Eq for DepreciationPeriod<T>
impl<T> StructuralPartialEq for DepreciationPeriod<T>
Auto Trait Implementations§
impl<T> Freeze for DepreciationPeriod<T>where
T: Freeze,
impl<T> RefUnwindSafe for DepreciationPeriod<T>where
T: RefUnwindSafe,
impl<T> Send for DepreciationPeriod<T>where
T: Send,
impl<T> Sync for DepreciationPeriod<T>where
T: Sync,
impl<T> Unpin for DepreciationPeriod<T>where
T: Unpin,
impl<T> UnwindSafe for DepreciationPeriod<T>where
T: UnwindSafe,
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