Skip to main content

pyobject_to_account_any

Function pyobject_to_account_any 

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

Converts a Python account object into a Rust AccountAny enum.

§Errors

Returns an error if:

  • Retrieving the account_type attribute fails.
  • Extracting the object into the account type’s concrete class fails.
  • The account_type is unsupported.