pub struct EmptyOptions { /* private fields */ }Expand description
Options for clearing Quick Access items.
By default, clearing Frequent Folders removes user-visited frequent folders
but leaves pinned folders alone. Use
EmptyOptions::remove_pinned_folders only when the caller explicitly wants
to unpin user-pinned folders too.
§Examples
use wincent::EmptyOptions;
let options = EmptyOptions::new()
.remove_pinned_folders()
.refresh_explorer();
assert!(options.also_pinned_folders());
assert!(options.force_refresh());Implementations§
Source§impl EmptyOptions
impl EmptyOptions
Sourcepub fn also_pinned_folders(&self) -> bool
pub fn also_pinned_folders(&self) -> bool
Whether pinned folders should also be removed.
Sourcepub fn with_also_pinned_folders(self, also_pinned_folders: bool) -> Self
pub fn with_also_pinned_folders(self, also_pinned_folders: bool) -> Self
Sets whether pinned folders should also be removed.
Sourcepub fn remove_pinned_folders(self) -> Self
pub fn remove_pinned_folders(self) -> Self
Also removes pinned folders when clearing Frequent Folders or all items.
Sourcepub fn force_refresh(&self) -> bool
pub fn force_refresh(&self) -> bool
Whether open Explorer windows should be refreshed after a successful clear.
Sourcepub fn with_force_refresh(self, force_refresh: bool) -> Self
pub fn with_force_refresh(self, force_refresh: bool) -> Self
Sets whether open Explorer windows should be refreshed after a successful clear.
Sourcepub fn refresh_explorer(self) -> Self
pub fn refresh_explorer(self) -> Self
Refreshes open Explorer windows after a successful clear.
Trait Implementations§
Source§impl Clone for EmptyOptions
impl Clone for EmptyOptions
Source§fn clone(&self) -> EmptyOptions
fn clone(&self) -> EmptyOptions
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 moreSource§impl Debug for EmptyOptions
impl Debug for EmptyOptions
Source§impl Default for EmptyOptions
impl Default for EmptyOptions
Source§fn default() -> EmptyOptions
fn default() -> EmptyOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for EmptyOptions
impl PartialEq for EmptyOptions
Source§fn eq(&self, other: &EmptyOptions) -> bool
fn eq(&self, other: &EmptyOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for EmptyOptions
impl Eq for EmptyOptions
impl StructuralPartialEq for EmptyOptions
Auto Trait Implementations§
impl Freeze for EmptyOptions
impl RefUnwindSafe for EmptyOptions
impl Send for EmptyOptions
impl Sync for EmptyOptions
impl Unpin for EmptyOptions
impl UnsafeUnpin for EmptyOptions
impl UnwindSafe for EmptyOptions
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