Enum blackscholes_python::OptionType
source · pub enum OptionType {
Call,
Put,
}
Expand description
The type of option to be priced. Call or Put.
Variants
Implementations
sourceimpl OptionType
impl OptionType
Trait Implementations
sourceimpl Clone for OptionType
impl Clone for OptionType
sourcefn clone(&self) -> OptionType
fn clone(&self) -> OptionType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for OptionType
impl Debug for OptionType
sourceimpl Display for OptionType
impl Display for OptionType
sourceimpl IntoPy<Py<PyAny>> for OptionType
impl IntoPy<Py<PyAny>> for OptionType
sourceimpl PartialEq<OptionType> for OptionType
impl PartialEq<OptionType> for OptionType
sourcefn eq(&self, other: &OptionType) -> bool
fn eq(&self, other: &OptionType) -> bool
sourceimpl PyClass for OptionType
impl PyClass for OptionType
sourceimpl PyClassImpl for OptionType
impl PyClassImpl for OptionType
sourceconst IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
sourceconst IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
sourceconst IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
sourceconst IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
type Layout = PyCell<OptionType>
type Layout = PyCell<OptionType>
Layout
type ThreadChecker = ThreadCheckerStub<OptionType>
type ThreadChecker = ThreadCheckerStub<OptionType>
This handles following two situations: Read more
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
type Dict = PyClassDummySlot
type Dict = PyClassDummySlot
Specify this class has
#[pyclass(dict)]
or not.type WeakRef = PyClassDummySlot
type WeakRef = PyClassDummySlot
Specify this class has
#[pyclass(weakref)]
or not.type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read morefn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a OptionType
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a OptionType
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OptionType
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut OptionType
sourceimpl PyMethods<OptionType> for PyClassImplCollector<OptionType>
impl PyMethods<OptionType> for PyClassImplCollector<OptionType>
fn py_methods(self) -> &'static PyClassItems
sourceimpl PyTypeInfo for OptionType
impl PyTypeInfo for OptionType
type AsRefTarget = PyCell<OptionType>
type AsRefTarget = PyCell<OptionType>
Utility type to make Py::as_ref work.
sourcefn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
sourcefn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
sourcefn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.sourcefn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.impl Eq for OptionType
impl StructuralEq for OptionType
impl StructuralPartialEq for OptionType
Auto Trait Implementations
impl RefUnwindSafe for OptionType
impl Send for OptionType
impl Sync for OptionType
impl Unpin for OptionType
impl UnwindSafe for OptionType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'a, T> FromPyObject<'a> for Twhere
T: PyClass + Clone,
impl<'a, T> FromPyObject<'a> for Twhere
T: PyClass + Clone,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.