Trait PyAppHandleExt

Source
pub trait PyAppHandleExt<R: Runtime>: Manager<R> {
    // Provided methods
    fn py_app_handle(&self) -> impl Deref<Target = Py<AppHandle>> { ... }
    fn try_py_app_handle(
        &self,
    ) -> PyAppHandleStateResult<impl Deref<Target = Py<AppHandle>>> { ... }
}
Expand description

You can use this trait to get the global singleton Py<AppHandle>.

Provided Methods§

Source

fn py_app_handle(&self) -> impl Deref<Target = Py<AppHandle>>

§Panics

Panics if PyAppHandleExt::try_py_app_handle returns an error.

Source

fn try_py_app_handle( &self, ) -> PyAppHandleStateResult<impl Deref<Target = Py<AppHandle>>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R: Runtime, T: Manager<R>> PyAppHandleExt<R> for T