pub struct TauriServer { /* private fields */ }Expand description
Wraps an AllFrame Router for Tauri IPC dispatch.
Constructed once at app startup and managed as Tauri state.
Provides in-process call_local for zero-overhead dispatch
(useful for local LLM integration without network).
Implementations§
Source§impl TauriServer
impl TauriServer
Sourcepub fn list_handlers(&self) -> &[HandlerInfo]
pub fn list_handlers(&self) -> &[HandlerInfo]
List all registered handlers
Sourcepub fn handler_count(&self) -> usize
pub fn handler_count(&self) -> usize
Number of registered handlers
Sourcepub async fn call_handler(
&self,
name: &str,
args: &str,
) -> Result<CallResponse, TauriServerError>
pub async fn call_handler( &self, name: &str, args: &str, ) -> Result<CallResponse, TauriServerError>
Call a handler by name (in-process, no Tauri runtime needed).
This enables zero-overhead dispatch for local LLM integration (e.g., Ollama) without opening a network port.
Sourcepub fn call_streaming_handler(
&self,
name: &str,
args: &str,
) -> Result<(StreamReceiver, JoinHandle<Result<CallResponse, TauriServerError>>), TauriServerError>
pub fn call_streaming_handler( &self, name: &str, args: &str, ) -> Result<(StreamReceiver, JoinHandle<Result<CallResponse, TauriServerError>>), TauriServerError>
Call a streaming handler by name.
Returns (StreamReceiver, JoinHandle) where:
StreamReceiveryields intermediate messagesJoinHandleresolves with the final handler result
Auto Trait Implementations§
impl Freeze for TauriServer
impl !RefUnwindSafe for TauriServer
impl Send for TauriServer
impl Sync for TauriServer
impl Unpin for TauriServer
impl UnsafeUnpin for TauriServer
impl !UnwindSafe for TauriServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more