Skip to main content

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

NameTypeDescription
configOption< &Bound< '_, PyDict > > = nullAn optional Python dictionary containing configuration keys and values used to initialize the object.