Skip to main content

PythonExt

Trait PythonExt 

Source
pub trait PythonExt<R: Runtime> {
    // Required methods
    fn python(&self) -> &Python<R>;
    fn runner(&self) -> &PyRunner;
    fn run_python<'life0, 'async_trait>(
        &'life0 self,
        payload: StringRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_function<'life0, 'async_trait>(
        &'life0 self,
        payload: RegisterRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn call_function<'life0, 'async_trait>(
        &'life0 self,
        payload: RunRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn read_variable<'life0, 'async_trait>(
        &'life0 self,
        payload: StringRequest,
    ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Extensions to tauri::App, tauri::AppHandle and tauri::Window to access the python APIs.

Required Methods§

Source

fn python(&self) -> &Python<R>

Source

fn runner(&self) -> &PyRunner

Source

fn run_python<'life0, 'async_trait>( &'life0 self, payload: StringRequest, ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn register_function<'life0, 'async_trait>( &'life0 self, payload: RegisterRequest, ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn call_function<'life0, 'async_trait>( &'life0 self, payload: RunRequest, ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn read_variable<'life0, 'async_trait>( &'life0 self, payload: StringRequest, ) -> Pin<Box<dyn Future<Output = Result<StringResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<R: Runtime, T: Manager<R> + Sync> PythonExt<R> for T