Struct PyDemand
pub(crate) struct PyDemand {
pub(crate) inner: Demand,
}Expand description
What a book needs from outside to price on a market: quote strips by
template, fixings by series and date, FX spots by pair — and the curves no
recipe builds. MarketContext.demand(book) derives one; a source’s
fetch(demand, as_of) answers it.
Fields§
§inner: DemandImplementations§
§impl PyDemand
impl PyDemand
fn asks(&self) -> bool
fn asks(&self) -> bool
Whether this demand asks a source for anything: a strip, a fixing or a spot. An async caller skips its fetch where it does not.
fn strips(&self) -> PyRecords
fn strips(&self) -> PyRecords
The quote strips: key (the collateral key whose recipe names the
template) and template.
fn unresolved(&self) -> PyRecords
fn unresolved(&self) -> PyRecords
The curves the book reads that no recipe builds: curve and reason.
fn out_of_scope(&self) -> Vec<String>
fn out_of_scope(&self) -> Vec<String>
What the book declares that sources do not serve yet.
fn recipe_ask(&self) -> PyRecipeAsk
fn recipe_ask(&self) -> PyRecipeAsk
The keys a recipe source is asked about.
fn __repr__(&self) -> String
Trait Implementations§
impl DerefToPyAny for PyDemand
§impl PyClassImpl for PyDemand
impl PyClassImpl for PyDemand
§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<PyDemand>
type ThreadChecker = SendablePyClass<PyDemand>
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 PyMethods<PyDemand> for PyClassImplCollector<PyDemand>
impl PyMethods<PyDemand> for PyClassImplCollector<PyDemand>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyDemand
impl PyTypeInfo for PyDemand
§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.Auto Trait Implementations§
impl Freeze for PyDemand
impl RefUnwindSafe for PyDemand
impl Send for PyDemand
impl Sync for PyDemand
impl Unpin for PyDemand
impl UnsafeUnpin for PyDemand
impl UnwindSafe for PyDemand
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