FromConfig
This trait provides a standardized interface for instantiating objects from a Python dictionary configuration. It defines a single method that handles the conversion of optional dictionary-based settings into a concrete Rust type, returning a result to manage potential configuration errors.
Constructor
Signature
@classmethod
def from_config(
config: Option< &Bound< '_, PyDict > > = null
) - > Self
Parameters
| Name | Type | Description |
|---|---|---|
| config | Option< &Bound< '_, PyDict > > = null | An optional Python dictionary containing configuration keys and values used to initialize the object. |