pub struct CashForecast {
pub id: String,
pub entity_id: String,
pub currency: String,
pub forecast_date: NaiveDate,
pub horizon_days: u32,
pub items: Vec<CashForecastItem>,
pub net_position: Decimal,
pub confidence_level: Decimal,
}Expand description
Forward-looking cash forecast for an entity.
Fields§
§id: StringUnique forecast identifier
entity_id: StringLegal entity
currency: StringForecast currency
forecast_date: NaiveDateDate the forecast was prepared
horizon_days: u32Number of days the forecast covers
items: Vec<CashForecastItem>Individual forecast line items
net_position: DecimalNet position (sum of probability-weighted amounts)
confidence_level: DecimalConfidence level for the forecast (0.0 to 1.0)
Implementations§
Source§impl CashForecast
impl CashForecast
Sourcepub fn new(
id: impl Into<String>,
entity_id: impl Into<String>,
currency: impl Into<String>,
forecast_date: NaiveDate,
horizon_days: u32,
items: Vec<CashForecastItem>,
confidence_level: Decimal,
) -> Self
pub fn new( id: impl Into<String>, entity_id: impl Into<String>, currency: impl Into<String>, forecast_date: NaiveDate, horizon_days: u32, items: Vec<CashForecastItem>, confidence_level: Decimal, ) -> Self
Creates a new cash forecast.
Sourcepub fn computed_net_position(&self) -> Decimal
pub fn computed_net_position(&self) -> Decimal
Recomputes the net position from the probability-weighted items.
Trait Implementations§
Source§impl Clone for CashForecast
impl Clone for CashForecast
Source§fn clone(&self) -> CashForecast
fn clone(&self) -> CashForecast
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 Debug for CashForecast
impl Debug for CashForecast
Source§impl<'de> Deserialize<'de> for CashForecast
impl<'de> Deserialize<'de> for CashForecast
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
Auto Trait Implementations§
impl Freeze for CashForecast
impl RefUnwindSafe for CashForecast
impl Send for CashForecast
impl Sync for CashForecast
impl Unpin for CashForecast
impl UnsafeUnpin for CashForecast
impl UnwindSafe for CashForecast
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