pub enum Function {
Constant(f64),
Linear(Linear),
Quadratic(Quadratic),
Polynomial(Polynomial),
}Expand description
Mathematical function up to polynomial.
A validated version of v1::Function. Since the ommx.v1.Function is defined by oneof in protobuf,
it may be None if we extend the Function enum in the future.
Suppose that we add new entry to ommx.v1.Function, e.g. Exponential or Logarithm,
and save it as ommx.v1.Function in future version of OMMX SDK. This encoded message may be decoded
by the current version of OMMX SDK, which does not support the new entry.
In this case, the new entry is decoded as None.
Variants§
Trait Implementations§
Source§impl From<Polynomial> for Function
impl From<Polynomial> for Function
Source§fn from(original: Polynomial) -> Function
fn from(original: Polynomial) -> Function
Converts to this type from the input type.
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl Freeze for Function
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
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