SchemaDict
No overview available.
Methods
get_as()
def get_as(
key: Bound< 'py, PyString >
) - > PyResult< Option< T > >
Retrieves an optional value from the schema dictionary and attempts to convert it to the specified type.
Parameters
| Name | Type | Description |
|---|---|---|
| key | Bound< 'py, PyString > | The dictionary key string used to look up the desired value. |
Returns
| Type | Description |
|---|---|
PyResult< Option< T > > | The value associated with the key if it exists and is convertible, otherwise None; wrapped in a PyResult. |
get_as_req()
def get_as_req(
key: Bound< 'py, PyString >
) - > PyResult< T >
Retrieves a required value from the schema dictionary and converts it to the specified type, raising an error if the key is missing.
Parameters
| Name | Type | Description |
|---|---|---|
| key | Bound< 'py, PyString > | The dictionary key string used to look up the required value. |
Returns
| Type | Description |
|---|---|
PyResult< T > | The converted value associated with the key; wrapped in a PyResult. |