Struct Portfolio

Source
pub struct Portfolio<DateTime, BidderId: Eq, PortfolioId: Eq + Hash, DemandId: Eq + Hash, ProductId: Eq + Hash, AppData> {
    pub id: PortfolioId,
    pub as_of: DateTime,
    pub app_data: AppData,
    pub bidder_id: BidderId,
    pub demand_group: Map<DemandId>,
    pub product_group: Map<ProductId>,
}
Expand description

Represents a portfolio entity in the flow trading system.

A portfolio acts as a container that groups together related demands and products for a specific bidder. It enables:

  • Aggregation of multiple demands into a single trading entity
  • Association of demands with specific products they can trade
  • Weighted distribution of allocations across demands

§Relationships

  • Bidder: Each portfolio is owned by exactly one bidder
  • Demands: Multiple demands can be associated to a portfolio, each with individual weights
  • Products: Multiple products can be associated to a portfolio, each with individual weights

Fields§

§id: PortfolioId

Unique identifier for this portfolio instance. Generated by the application when creating a new portfolio.

§as_of: DateTime

Timestamp when this version of the portfolio was created or last updated. Used for temporal queries and history tracking.

§app_data: AppData

Application-specific data attached to this portfolio. This field allows extending the portfolio with custom data without modifying the core schema.

§bidder_id: BidderId

The bidder who owns this portfolio. A bidder can have multiple portfolios to organize different trading strategies.

§demand_group: Map<DemandId>

Map of demands associated with this portfolio and their weights.

§product_group: Map<ProductId>

Map of products this portfolio can trade and their weights.

Auto Trait Implementations§

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> Freeze for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: Freeze, DateTime: Freeze, AppData: Freeze, BidderId: Freeze,

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> RefUnwindSafe for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: RefUnwindSafe, DateTime: RefUnwindSafe, AppData: RefUnwindSafe, BidderId: RefUnwindSafe, DemandId: RefUnwindSafe, ProductId: RefUnwindSafe,

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> Send for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: Send, DateTime: Send, AppData: Send, BidderId: Send, DemandId: Send, ProductId: Send,

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> Sync for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: Sync, DateTime: Sync, AppData: Sync, BidderId: Sync, DemandId: Sync, ProductId: Sync,

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> Unpin for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: Unpin, DateTime: Unpin, AppData: Unpin, BidderId: Unpin, DemandId: Unpin, ProductId: Unpin,

§

impl<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData> UnwindSafe for Portfolio<DateTime, BidderId, PortfolioId, DemandId, ProductId, AppData>
where PortfolioId: UnwindSafe, DateTime: UnwindSafe, AppData: UnwindSafe, BidderId: UnwindSafe, DemandId: UnwindSafe, ProductId: UnwindSafe,

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> 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, 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.