pub enum OptionType {
Call,
Put,
}Expand description
Option type: call or put.
A typed convenience/serde label for call-vs-put. The numeric API
(price, compute_greeks,
solve_iv, …) selects via an is_call: bool argument;
bridge to it with OptionType::is_call. OptionType-taking convenience
overloads can be added in a future minor version without a breaking change.
Variants§
Call
European call option (right to buy at strike).
Put
European put option (right to sell at strike).
Implementations§
Trait Implementations§
Source§impl Clone for OptionType
impl Clone for OptionType
Source§fn clone(&self) -> OptionType
fn clone(&self) -> OptionType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionType
impl Debug for OptionType
Source§impl<'de> Deserialize<'de> for OptionType
impl<'de> Deserialize<'de> for OptionType
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
Source§impl Display for OptionType
impl Display for OptionType
Source§impl Hash for OptionType
impl Hash for OptionType
Source§impl PartialEq for OptionType
impl PartialEq for OptionType
Source§fn eq(&self, other: &OptionType) -> bool
fn eq(&self, other: &OptionType) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for OptionType
impl Serialize for OptionType
impl Copy for OptionType
impl Eq for OptionType
impl StructuralPartialEq for OptionType
Auto Trait Implementations§
impl Freeze for OptionType
impl RefUnwindSafe for OptionType
impl Send for OptionType
impl Sync for OptionType
impl Unpin for OptionType
impl UnsafeUnpin for OptionType
impl UnwindSafe for OptionType
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