parse_embedder

Function parse_embedder 

Source
pub fn parse_embedder(
    embedder: Option<&Bound<'_, PyAny>>,
) -> Result<Option<Arc<Embedder>>, EvaluationError>
Expand description

Helper function for extracting embedder and runtime from optional PyEmbedder

§Arguments

  • embedder - Optional reference to a PyEmbedder instance.

§Returns

An optional Arc-wrapped Embedder instance if provided, otherwise None.