pub enum DemandCurveDto {
Pwl(PwlCurveDto),
Constant(ConstantCurveDto),
}
Expand description
DTO for demand curves to enable validation during deserialization
Variants§
Trait Implementations§
Source§impl Debug for DemandCurveDto
impl Debug for DemandCurveDto
Source§impl Into<DemandCurveDto> for DemandCurve
impl Into<DemandCurveDto> for DemandCurve
Source§fn into(self) -> DemandCurveDto
fn into(self) -> DemandCurveDto
Converts this type into the (usually inferred) input type.
Source§impl TryFrom<DemandCurveDto> for DemandCurve
impl TryFrom<DemandCurveDto> for DemandCurve
Source§fn try_from(value: DemandCurveDto) -> Result<Self, Self::Error>
fn try_from(value: DemandCurveDto) -> Result<Self, Self::Error>
Creates a demand curve from a DTO, validating all constraints
Source§type Error = DemandCurveError
type Error = DemandCurveError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for DemandCurveDto
impl RefUnwindSafe for DemandCurveDto
impl Send for DemandCurveDto
impl Sync for DemandCurveDto
impl Unpin for DemandCurveDto
impl UnwindSafe for DemandCurveDto
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