Skip to main content

FrameworkSettings

Struct FrameworkSettings 

Source
pub struct FrameworkSettings {
    pub framework: AccountingFramework,
    pub use_lifo_inventory: bool,
    pub capitalize_development_costs: bool,
    pub use_ppe_revaluation: bool,
    pub allow_impairment_reversal: bool,
    pub lease_term_threshold: f64,
    pub lease_pv_threshold: f64,
    pub default_incremental_borrowing_rate: f64,
    pub variable_consideration_constraint: f64,
}
Expand description

Framework-specific settings that control accounting treatment options.

These settings allow fine-grained control over framework-specific accounting policies within the selected framework.

Fields§

§framework: AccountingFramework

The primary accounting framework.

§use_lifo_inventory: bool

Whether to use LIFO inventory costing (US GAAP only).

Default: false (use FIFO/weighted average)

§capitalize_development_costs: bool

Whether to capitalize development costs (IFRS requirement, US GAAP option).

Under IFRS, development costs must be capitalized when criteria are met. Under US GAAP, most development costs are expensed.

§use_ppe_revaluation: bool

Whether to use revaluation model for PPE (IFRS option).

Under IFRS, entities can choose between cost model and revaluation model. Under US GAAP, revaluation above cost is not permitted.

§allow_impairment_reversal: bool

Whether to reverse impairment losses when conditions improve (IFRS option).

Under IFRS, impairment losses (except for goodwill) can be reversed. Under US GAAP, impairment losses generally cannot be reversed.

§lease_term_threshold: f64

Threshold percentage for lease term test (US GAAP: 75%).

A lease is classified as finance/capital if the lease term is >= this percentage of the asset’s economic life.

§lease_pv_threshold: f64

Threshold percentage for present value test (US GAAP: 90%).

A lease is classified as finance/capital if the present value of lease payments is >= this percentage of the asset’s fair value.

§default_incremental_borrowing_rate: f64

Default incremental borrowing rate for lease calculations.

§variable_consideration_constraint: f64

Revenue recognition constraint for variable consideration.

Under both frameworks, variable consideration is constrained to the amount that is highly probable (IFRS) or probable (US GAAP) not to result in a significant revenue reversal.

Implementations§

Source§

impl FrameworkSettings

Source

pub fn us_gaap() -> Self

Create settings for US GAAP with typical US company policies.

Source

pub fn ifrs() -> Self

Create settings for IFRS with typical international policies.

Source

pub fn dual_reporting() -> Self

Create settings for dual reporting.

Source

pub fn validate(&self) -> Result<(), FrameworkValidationError>

Validate settings are consistent with the selected framework.

Trait Implementations§

Source§

impl Clone for FrameworkSettings

Source§

fn clone(&self) -> FrameworkSettings

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameworkSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FrameworkSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FrameworkSettings

Source§

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 Serialize for FrameworkSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,