pub fn _enum_to_bincode(&self) -> PyResult<Py<PyByteArray>> {
        let aqt_enum: AqtDevice = (&self.internal).into();
        let serialized = serialize(&aqt_enum)
            .map_err(|_| PyValueError::new_err("Cannot serialize SimulatorDevice to bytes"))?;
        let b: Py<PyByteArray> = Python::with_gil(|py| -> Py<PyByteArray> {
            PyByteArray::new(py, &serialized[..]).into()
        });
        Ok(b)
    }
/// Return the bincode representation of the Enum variant of the Device.
///
/// Only used for internal interfacing.
///
/// Returns:
///     ByteArray: The serialized AqtDevice (in [bincode] form).
///
/// Raises:
///     ValueError: Cannot serialize Device to bytes.
Return the bincode representation of the Enum variant of the Device.
Only used for internal interfacing.

The serialized AqtDevice (in [bincode] form).

Cannot serialize Device to bytes.
Return the bincode representation of the Enum variant of the Device . Only used for internal interfacing . The serialized AqtDevice ( in [ bincode ] form ) . Cannot serialize Device to bytes .
pub fn _enum_to_bincode(&self) -> PyResult<Py<PyByteArray>> {
        let aqt_enum: AqtDevice = (&self.internal).into();
        let serialized = serialize(&aqt_enum)
            .map_err(|_| PyValueError::new_err("Cannot serialize SimulatorDevice to bytes"))?;
        let b: Py<PyByteArray> = Python::with_gil(|py| -> Py<PyByteArray> {
            PyByteArray::new(py, &serialized[..]).into()
        });
        Ok(b)
    }
pub fn _enum_to_bincode ( & self ) -> PyResult < Py < PyByteArray > > { let aqt_enum : AqtDevice = ( & self . internal ) . into ( ) ; let serialized = serialize ( & aqt_enum ) . map_err ( | _ | PyValueError :: new_err ( " " ) ) ? ; let b : Py < PyByteArray > = Python :: with_gil ( | py | -> Py < PyByteArray > { PyByteArray :: new ( py , & serialized [ .. ] ) . into ( ) } ) ; Ok ( b ) }
Return the bincode representation of the Enum variant of the Device.
Return the bincode representation of the Enum variant of the Device .
&self
&self