pub enum OptionType {
Call,
Put,
}Expand description
European option type — call or put.
Determines the payoff direction in all pricing models.
§Examples
use regit_blackscholes::types::OptionType;
let ot = OptionType::Call;
assert!(matches!(ot, OptionType::Call));Variants§
Call
Right to buy the underlying at the strike price.
Put
Right to sell the underlying at the strike price.
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 moreimpl Copy for OptionType
Source§impl Debug for OptionType
impl Debug for OptionType
impl Eq for OptionType
Source§impl Hash for OptionType
impl Hash for OptionType
Source§impl PartialEq for OptionType
impl PartialEq 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