fn serialize<'p>(&self, py: Python<'p>) -> PyResult<&'p PyBytes> {
        // Get the module artifact.
        match self.module.cache() {
            // Serialize the artifact.
            Ok(artifact) => match artifact.serialize() {
                Ok(serialized_artifact) => Ok(PyBytes::new(py, serialized_artifact.as_slice())),
                Err(_) => Err(RuntimeError::py_err(
                    "Failed to serialize the module artifact.",
                )),
            },
            Err(_) => Err(RuntimeError::py_err("Failed to get the module artifact.")),
        }
    }
/// Serialize the module into Python bytes.
Serialize the module into Python bytes.
Serialize the module into Python bytes .
fn serialize<'p>(&self, py: Python<'p>) -> PyResult<&'p PyBytes> {
        // Get the module artifact.
        match self.module.cache() {
            // Serialize the artifact.
            Ok(artifact) => match artifact.serialize() {
                Ok(serialized_artifact) => Ok(PyBytes::new(py, serialized_artifact.as_slice())),
                Err(_) => Err(RuntimeError::py_err(
                    "Failed to serialize the module artifact.",
                )),
            },
            Err(_) => Err(RuntimeError::py_err("Failed to get the module artifact.")),
        }
    }
fn serialize < ' p > ( & self , py : Python < ' p > ) -> PyResult < & ' p PyBytes > { // Get the module artifact. match self . module . cache ( ) { // Serialize the artifact. Ok ( artifact ) => match artifact . serialize ( ) { Ok ( serialized_artifact ) => Ok ( PyBytes :: new ( py , serialized_artifact . as_slice ( ) ) ) , Err ( _ ) => Err ( RuntimeError :: py_err ( " " , ) ) , } , Err ( _ ) => Err ( RuntimeError :: py_err ( " " ) ) , } }
Serialize the module into Python bytes.
Serialize the module into Python bytes .
&self
py
Python<'p>
&self
py
Python<'p>