pub struct Asset {
pub name: String,
pub expected_return: f64,
pub weight: f64,
}Expand description
A single investable asset with expected return and current weight.
Fields§
§name: StringAsset name or ticker.
expected_return: f64Annualized expected return (e.g. 0.08 = 8%).
weight: f64Current portfolio weight (0.0 – 1.0).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Asset
impl RefUnwindSafe for Asset
impl Send for Asset
impl Sync for Asset
impl Unpin for Asset
impl UnsafeUnpin for Asset
impl UnwindSafe for Asset
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