MCPcopy Create free account
hub / github.com/dgrunwald/rust-cpython / new

Method new

src/python.rs:66–77  ·  view source on GitHub ↗
(
        py: Python<'p>,
        expected_type_name: impl Into<String>,
        received_type: PyType,
    )

Source from the content-addressed store, hash-verified

64
65impl<'p> PythonObjectDowncastError<'p> {
66 pub fn new(
67 py: Python<'p>,
68 expected_type_name: impl Into<String>,
69 received_type: PyType,
70 ) -> Self {
71 let expected_type_name = expected_type_name.into();
72 PythonObjectDowncastError {
73 py,
74 expected_type_name,
75 received_type,
76 }
77 }
78}
79
80/// Trait implemented by Python object types that allow a checked downcast.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected