pyo3::impl_::extract_argument

Function from_py_with_with_default

Source
#[doc(hidden)] pub fn from_py_with_with_default<'a, 'py, T>(
    obj: Option<&'a Bound<'py, PyAny>>,
    arg_name: &str,
    extractor: fn(_: &'a Bound<'py, PyAny>) -> PyResult<T>,
    default: fn() -> T,
) -> PyResult<T>
Expand description

Alternative to extract_argument used when the argument has a #[pyo3(from_py_with)] annotation and also a default value.

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here