pub struct CashGeneratingUnit {
pub cgu_id: String,
pub name: String,
pub member_entity_codes: Vec<String>,
pub segment_code: Option<String>,
}Expand description
A cash-generating unit per IAS 36 § 6 — the smallest identifiable group of assets that generates largely independent cash inflows.
Fields§
§cgu_id: StringUnique CGU identifier — typically a stable code so allocations can be tracked across periods.
name: StringHuman-readable name (e.g. “EMEA Consumer Products”).
member_entity_codes: Vec<String>Codes of the entities (subsidiaries / branches) whose cash flows are aggregated to form this CGU. A CGU may span multiple legal entities or be a sub-division of a single entity.
segment_code: Option<String>Reportable segment this CGU rolls up to (IFRS 8 / ASC 280). Multiple CGUs can map to the same segment. None when no segment-reporting attribution applies.
Implementations§
Source§impl CashGeneratingUnit
impl CashGeneratingUnit
Sourcepub fn new(
cgu_id: impl Into<String>,
name: impl Into<String>,
member_entity_codes: Vec<String>,
) -> Self
pub fn new( cgu_id: impl Into<String>, name: impl Into<String>, member_entity_codes: Vec<String>, ) -> Self
Construct a CGU. member_entity_codes may be empty if the
CGU is being seeded for later allocation; downstream tests
require at least one member.
Sourcepub fn with_segment(self, segment_code: impl Into<String>) -> Self
pub fn with_segment(self, segment_code: impl Into<String>) -> Self
Attach a reportable segment code (IFRS 8 / ASC 280).
Trait Implementations§
Source§impl Clone for CashGeneratingUnit
impl Clone for CashGeneratingUnit
Source§fn clone(&self) -> CashGeneratingUnit
fn clone(&self) -> CashGeneratingUnit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CashGeneratingUnit
impl Debug for CashGeneratingUnit
Source§impl<'de> Deserialize<'de> for CashGeneratingUnit
impl<'de> Deserialize<'de> for CashGeneratingUnit
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>,
Source§impl PartialEq for CashGeneratingUnit
impl PartialEq for CashGeneratingUnit
Source§fn eq(&self, other: &CashGeneratingUnit) -> bool
fn eq(&self, other: &CashGeneratingUnit) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for CashGeneratingUnit
impl Serialize for CashGeneratingUnit
impl StructuralPartialEq for CashGeneratingUnit
Auto Trait Implementations§
impl Freeze for CashGeneratingUnit
impl RefUnwindSafe for CashGeneratingUnit
impl Send for CashGeneratingUnit
impl Sync for CashGeneratingUnit
impl Unpin for CashGeneratingUnit
impl UnsafeUnpin for CashGeneratingUnit
impl UnwindSafe for CashGeneratingUnit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.