pub struct BootBuilder<R: Runtime> { /* private fields */ }Expand description
Implementations§
Source§impl<R: Runtime> BootBuilder<R>
impl<R: Runtime> BootBuilder<R>
Source§impl<R: Runtime> BootBuilder<R>
impl<R: Runtime> BootBuilder<R>
Sourcepub fn on_boot<F, Fut>(self, steps: u32, f: F) -> Self
pub fn on_boot<F, Fut>(self, steps: u32, f: F) -> Self
Set the async boot closure.
steps is the total number of progress steps (for the denominator
in BootProgress). The closure receives a BootContext for state
injection and progress reporting.
The boot closure runs on a dedicated current-thread Tokio runtime
inside Tauri’s synchronous setup() hook. It blocks until completion,
ensuring all state is ready before the UI renders.
Sourcepub fn build(self) -> TauriPlugin<R>
pub fn build(self) -> TauriPlugin<R>
Build the Tauri plugin.
If on_boot was called, a current-thread Tokio
runtime is created inside setup() to drive the async boot to
completion before the app renders.
Auto Trait Implementations§
impl<R> Freeze for BootBuilder<R>
impl<R> !RefUnwindSafe for BootBuilder<R>
impl<R> Send for BootBuilder<R>
impl<R> !Sync for BootBuilder<R>
impl<R> Unpin for BootBuilder<R>
impl<R> UnsafeUnpin for BootBuilder<R>
impl<R> !UnwindSafe for BootBuilder<R>
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