pub struct ConsentFile {
pub version: u32,
pub state: PersistedConsentState,
pub decided_at: Option<SystemTime>,
pub consented_to_event_schema: u32,
pub endpoint_at_consent_time: String,
}Expand description
On-disk consent record. Persisted via SettingsFile<ConsentFile>.
Fields§
§version: u32ConsentFile schema version (driven by Versioned).
state: PersistedConsentState§decided_at: Option<SystemTime>§consented_to_event_schema: u32EVENT schema version at the time consent was given. When the
framework’s event schema increments past this number, the
store resets to Unknown so the widget re-prompts.
endpoint_at_consent_time: StringThe endpoint the consent was given against. If the user changes the endpoint override later, this differs from the reporter’s current endpoint and the store re-prompts (the recipient-changed rule: consent is tied to the data recipient).
Trait Implementations§
Source§impl Clone for ConsentFile
impl Clone for ConsentFile
Source§fn clone(&self) -> ConsentFile
fn clone(&self) -> ConsentFile
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 ConsentFile
impl Debug for ConsentFile
Source§impl Default for ConsentFile
impl Default for ConsentFile
Source§fn default() -> ConsentFile
fn default() -> ConsentFile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ConsentFile
impl<'de> Deserialize<'de> for ConsentFile
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
Source§impl Serialize for ConsentFile
impl Serialize for ConsentFile
Source§impl Versioned for ConsentFile
impl Versioned for ConsentFile
Source§const CURRENT_VERSION: u32 = 1
const CURRENT_VERSION: u32 = 1
The version this build understands. Bump when the schema changes
in a way that requires migration.
Source§fn set_version(&mut self, v: u32)
fn set_version(&mut self, v: u32)
Write a new version into this instance. Used by the migrator
after a successful chain of steps.
Auto Trait Implementations§
impl Freeze for ConsentFile
impl RefUnwindSafe for ConsentFile
impl Send for ConsentFile
impl Sync for ConsentFile
impl Unpin for ConsentFile
impl UnsafeUnpin for ConsentFile
impl UnwindSafe for ConsentFile
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