Struct PyFrequency
pub(crate) struct PyFrequency {
inner: Frequency,
}Expand description
A coupon frequency: one of the named members, or a period a caller spells
(Frequency("28D") for the 28-day markets).
Frequency("6M") is Frequency.SemiAnnual; the two are one value. Once
is a single payment at maturity and has no recurring period, so where a
schedule is generated it is refused rather than stepped by.
Fields§
§inner: FrequencyImplementations§
§impl PyFrequency
impl PyFrequency
§impl PyFrequency
impl PyFrequency
fn new(spelling: &str) -> PyResult<Self>
fn new(spelling: &str) -> PyResult<Self>
A frequency from its spelling: a member’s name ("SemiAnnual") or a
period code ("6M", "28D").
fn __repr__(&self) -> String
fn __str__(&self) -> String
fn annual() -> Self
fn semi_annual() -> Self
fn quarterly() -> Self
fn bi_monthly() -> Self
fn monthly() -> Self
fn weekly() -> Self
fn daily() -> Self
fn once() -> Self
Trait Implementations§
§impl Clone for PyFrequency
impl Clone for PyFrequency
§fn clone(&self) -> PyFrequency
fn clone(&self) -> PyFrequency
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 PyFrequency
§impl Debug for PyFrequency
impl Debug for PyFrequency
impl DerefToPyAny for PyFrequency
impl Eq for PyFrequency
§impl Hash for PyFrequency
impl Hash for PyFrequency
§impl IntoPy<Py<PyAny>> for PyFrequency
impl IntoPy<Py<PyAny>> for PyFrequency
§impl PartialEq for PyFrequency
impl PartialEq for PyFrequency
§impl PyClass for PyFrequency
impl PyClass for PyFrequency
§impl PyClassImpl for PyFrequency
impl PyClassImpl for PyFrequency
§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = SendablePyClass<PyFrequency>
type ThreadChecker = SendablePyClass<PyFrequency>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
Immutable or mutable
§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.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
§impl PyClassNewTextSignature<PyFrequency> for PyClassImplCollector<PyFrequency>
impl PyClassNewTextSignature<PyFrequency> for PyClassImplCollector<PyFrequency>
fn new_text_signature(self) -> Option<&'static str>
§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyFrequency
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyFrequency
§impl PyMethods<PyFrequency> for PyClassImplCollector<PyFrequency>
impl PyMethods<PyFrequency> for PyClassImplCollector<PyFrequency>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyFrequency
impl PyTypeInfo for PyFrequency
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object is an instance of this type.impl StructuralPartialEq for PyFrequency
Auto Trait Implementations§
impl Freeze for PyFrequency
impl RefUnwindSafe for PyFrequency
impl Send for PyFrequency
impl Sync for PyFrequency
impl Unpin for PyFrequency
impl UnsafeUnpin for PyFrequency
impl UnwindSafe for PyFrequency
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