pub enum CostData {
Curve(Curve),
Constant(Constant),
}Expand description
The utility-specification of the cost
CostData represents either:
- A non-increasing, piecewise-linear demand curve assigning a cost to each quantity in its domain, or
- A simple, “flat” demand curve assining a constant cost to each quantity in its domain.
This is the core component that defines how a bidder values different trade outcomes.
Variants§
Curve(Curve)
A piecewise linear demand curve defined by points
Constant(Constant)
A constant constraint enforcing a specific trade quantity at a price
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CostData
impl<'de> Deserialize<'de> for CostData
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
impl StructuralPartialEq for CostData
Auto Trait Implementations§
impl Freeze for CostData
impl RefUnwindSafe for CostData
impl Send for CostData
impl Sync for CostData
impl Unpin for CostData
impl UnwindSafe for CostData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more