Function pyobject_to_account_any

Source
pub fn pyobject_to_account_any(
    py: Python<'_>,
    account: PyObject,
) -> PyResult<AccountAny>
Expand description

Converts a Python account object into a Rust AccountAny enum.

ยงErrors

Returns a PyErr if:

  • retrieving the account_type attribute fails.
  • extracting the object into CashAccount or MarginAccount fails.
  • the account_type is unsupported.