pub struct Builder { /* private fields */ }
Implementations§
Source§impl Builder
impl Builder
pub fn new() -> Self
Sourcepub fn with_state_flags(self, flags: StateFlags) -> Self
pub fn with_state_flags(self, flags: StateFlags) -> Self
Sets the state flags to control what state gets restored and saved.
Sourcepub fn with_filename(self, filename: impl Into<String>) -> Self
pub fn with_filename(self, filename: impl Into<String>) -> Self
Sets a custom filename to use when saving and restoring window states from disk.
Sourcepub fn with_denylist(self, denylist: &[&str]) -> Self
pub fn with_denylist(self, denylist: &[&str]) -> Self
Sets a list of windows that shouldn’t be tracked and managed by this plugin For example, splash screen windows.
Sourcepub fn with_filter<F>(self, filter_callback: F) -> Self
pub fn with_filter<F>(self, filter_callback: F) -> Self
Sets a filter callback to exclude specific windows from being tracked.
Return true
to save the state, or false
to skip and not save it.
Sourcepub fn skip_initial_state(self, label: &str) -> Self
pub fn skip_initial_state(self, label: &str) -> Self
Adds the given window label to a list of windows to skip initial state restore.
Sourcepub fn map_label<F>(self, map_fn: F) -> Self
pub fn map_label<F>(self, map_fn: F) -> Self
Transforms the window label when saving the window state.
This can be used to group different windows to use the same state.
pub fn build<R: Runtime>(self) -> TauriPlugin<R>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl !RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl !UnwindSafe for Builder
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