pub struct PrivacySettings {
pub mode: PrivacyMode,
pub remember_recent_searches: bool,
pub persist_snippets: bool,
pub clear_temporary_previews_on_exit: bool,
pub diagnostics_include_paths: bool,
pub diagnostics_include_recent_searches: bool,
}Expand description
Fine-grained privacy preferences (RFC-039 §17).
mode governs defaults; individual fields may further restrict
behavior. Strict mode forces some fields to their most private value
regardless of what the user previously selected.
Fields§
§mode: PrivacyMode§remember_recent_searches: boolWhether to persist recent search queries.
persist_snippets: boolWhether to store snippet previews across sessions.
clear_temporary_previews_on_exit: boolWhether to clear temporary previews when the app exits.
diagnostics_include_paths: boolWhether diagnostics may include raw filesystem paths.
diagnostics_include_recent_searches: boolWhether diagnostics may include recent search queries.
Implementations§
Source§impl PrivacySettings
impl PrivacySettings
Sourcepub fn with_mode_applied(self) -> Self
pub fn with_mode_applied(self) -> Self
Apply strict-mode overrides (RFC-039 §9).
Strict mode forces the most private values for settings it controls, regardless of individual field values.
Sourcepub fn effective_recent_searches(&self) -> bool
pub fn effective_recent_searches(&self) -> bool
Effective value for recent searches, accounting for mode.
Sourcepub fn effective_snippet_persistence(&self) -> bool
pub fn effective_snippet_persistence(&self) -> bool
Effective value for snippet persistence, accounting for mode.
Trait Implementations§
Source§impl Clone for PrivacySettings
impl Clone for PrivacySettings
Source§fn clone(&self) -> PrivacySettings
fn clone(&self) -> PrivacySettings
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 PrivacySettings
impl Debug for PrivacySettings
Source§impl Default for PrivacySettings
impl Default for PrivacySettings
Source§impl<'de> Deserialize<'de> for PrivacySettings
impl<'de> Deserialize<'de> for PrivacySettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrivacySettings
impl RefUnwindSafe for PrivacySettings
impl Send for PrivacySettings
impl Sync for PrivacySettings
impl Unpin for PrivacySettings
impl UnsafeUnpin for PrivacySettings
impl UnwindSafe for PrivacySettings
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