Struct PyMeasure
pub struct PyMeasure {
pub(crate) inner: Measure,
}Expand description
A quantity a report asks for: Measure.Npv, or a first-order sensitivity
on an axis against a basis, collapsed by an aggregation, in a scale — what
the grammar spells delta:<axis>[:<basis>[:<aggregation>]][:<scale>].
A value beside the string, never instead of it: code() prints the
grammar, Measure(spelling) parses it, and Book.report takes either.
Fields§
§inner: MeasureImplementations§
§impl PyMeasure
impl PyMeasure
pub(crate) fn npv() -> Self
pub(crate) fn npv() -> Self
Present value.
pub(crate) fn __str__(&self) -> String
pub(crate) fn __repr__(&self) -> String
pub(crate) fn axis(&self) -> Option<PyRiskAxis>
pub(crate) fn axis(&self) -> Option<PyRiskAxis>
The axis, or None for Npv.
pub(crate) fn aggregation(&self) -> Option<PyAggregation>
pub(crate) fn aggregation(&self) -> Option<PyAggregation>
The aggregation, or None for Npv.
Trait Implementations§
impl Copy for PyMeasure
impl DerefToPyAny for PyMeasure
impl Eq for PyMeasure
§impl PyClassImpl for PyMeasure
impl PyClassImpl for PyMeasure
§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<PyMeasure>
type ThreadChecker = SendablePyClass<PyMeasure>
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<PyMeasure> for PyClassImplCollector<PyMeasure>
impl PyClassNewTextSignature<PyMeasure> for PyClassImplCollector<PyMeasure>
fn new_text_signature(self) -> Option<&'static str>
§impl PyMethods<PyMeasure> for PyClassImplCollector<PyMeasure>
impl PyMethods<PyMeasure> for PyClassImplCollector<PyMeasure>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyMeasure
impl PyTypeInfo for PyMeasure
§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 PyMeasure
Auto Trait Implementations§
impl Freeze for PyMeasure
impl RefUnwindSafe for PyMeasure
impl Send for PyMeasure
impl Sync for PyMeasure
impl Unpin for PyMeasure
impl UnsafeUnpin for PyMeasure
impl UnwindSafe for PyMeasure
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