pub struct WindowStateStore { /* private fields */ }Implementations§
Source§impl WindowStateStore
impl WindowStateStore
pub fn new(path: PathBuf) -> Self
pub fn restore(&self, label: &str) -> Option<WindowGeometry>
pub fn restore_tracked_windows(&self) -> Vec<WindowDescriptor>
pub fn remember( &self, label: &str, geometry: WindowGeometry, ) -> Result<(), String>
pub fn remember_window( &self, descriptor: WindowDescriptor, ) -> Result<(), String>
pub fn forget(&self, label: &str) -> Result<(), String>
pub fn forget_window(&self, label: &str) -> Result<(), String>
Sourcepub fn purge_window(&self, label: &str) -> Result<bool, String>
pub fn purge_window(&self, label: &str) -> Result<bool, String>
Removes every persisted record for a window label.
Use this only for startup cleanup of stale records. Normal close flows keep geometry so windows can reopen with their last known size and position.
pub fn flush(&self) -> Result<(), String>
Trait Implementations§
Source§impl Clone for WindowStateStore
impl Clone for WindowStateStore
Source§fn clone(&self) -> WindowStateStore
fn clone(&self) -> WindowStateStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WindowStateStore
impl RefUnwindSafe for WindowStateStore
impl Send for WindowStateStore
impl Sync for WindowStateStore
impl Unpin for WindowStateStore
impl UnsafeUnpin for WindowStateStore
impl UnwindSafe for WindowStateStore
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