pub struct ConsentScope {
pub anonymous_metrics: bool,
pub crash_reports: bool,
pub feature_flags: bool,
pub session_recording: bool,
}Expand description
Per-purpose consent toggles. Each is independent.
Defaults to all-false: an Unknown state translates to “no
scopes granted” until the user explicitly opts in. The widget shows
a toggle row per scope and an Accept-all / Reject-all pair (CNIL
equal-prominence rule).
Fields§
§anonymous_metrics: boolAnonymous usage metrics (intent dispatches, lifecycle, census). Anonymous mode always uses this scope — no other scope makes sense without a stable id.
crash_reports: boolCrash reports. Reserved — no transport yet.
feature_flags: boolFeature-flag fetches. Reserved — no transport yet.
session_recording: boolSession recording. Reserved; not implemented (PII risk).
Implementations§
Source§impl ConsentScope
impl ConsentScope
Sourcepub fn none() -> ConsentScope
pub fn none() -> ConsentScope
All scopes off — the default, and the value used for Denied.
Sourcepub fn all() -> ConsentScope
pub fn all() -> ConsentScope
All scopes on — convenience for tests and “Accept all”.
pub fn anonymous_metrics_only() -> ConsentScope
Trait Implementations§
Source§impl Clone for ConsentScope
impl Clone for ConsentScope
Source§fn clone(&self) -> ConsentScope
fn clone(&self) -> ConsentScope
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 moreimpl Copy for ConsentScope
Source§impl Debug for ConsentScope
impl Debug for ConsentScope
Source§impl Default for ConsentScope
impl Default for ConsentScope
Source§fn default() -> ConsentScope
fn default() -> ConsentScope
Returns the “default value” for a type. Read more
impl Eq for ConsentScope
Source§impl From<ConsentScope> for PersistedConsentScope
impl From<ConsentScope> for PersistedConsentScope
Source§fn from(s: ConsentScope) -> Self
fn from(s: ConsentScope) -> Self
Converts to this type from the input type.
Source§impl From<PersistedConsentScope> for ConsentScope
impl From<PersistedConsentScope> for ConsentScope
Source§fn from(s: PersistedConsentScope) -> Self
fn from(s: PersistedConsentScope) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ConsentScope
impl PartialEq for ConsentScope
impl StructuralPartialEq for ConsentScope
Auto Trait Implementations§
impl Freeze for ConsentScope
impl RefUnwindSafe for ConsentScope
impl Send for ConsentScope
impl Sync for ConsentScope
impl Unpin for ConsentScope
impl UnsafeUnpin for ConsentScope
impl UnwindSafe for ConsentScope
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