pub enum ConsentState {
Unknown,
Granted(ConsentScope),
Denied,
}Expand description
Top-level consent state, persisted via teksilo-telemetry::ConsentStore.
Variants§
Unknown
Pre-decision. The widget must prompt; no events emitted.
Granted(ConsentScope)
User granted consent for the listed scopes.
Denied
User explicitly declined. No events emitted.
Implementations§
Source§impl ConsentState
impl ConsentState
pub fn is_granted(&self) -> bool
pub fn scope(&self) -> Option<&ConsentScope>
Trait Implementations§
Source§impl Clone for ConsentState
impl Clone for ConsentState
Source§fn clone(&self) -> ConsentState
fn clone(&self) -> ConsentState
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 ConsentState
impl Debug for ConsentState
Source§impl Default for ConsentState
impl Default for ConsentState
Source§fn default() -> ConsentState
fn default() -> ConsentState
Returns the “default value” for a type. Read more
impl Eq for ConsentState
Source§impl From<ConsentState> for PersistedConsentState
impl From<ConsentState> for PersistedConsentState
Source§fn from(c: ConsentState) -> Self
fn from(c: ConsentState) -> Self
Converts to this type from the input type.
Source§impl From<PersistedConsentState> for ConsentState
impl From<PersistedConsentState> for ConsentState
Source§fn from(p: PersistedConsentState) -> Self
fn from(p: PersistedConsentState) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ConsentState
impl PartialEq for ConsentState
impl StructuralPartialEq for ConsentState
Auto Trait Implementations§
impl Freeze for ConsentState
impl RefUnwindSafe for ConsentState
impl Send for ConsentState
impl Sync for ConsentState
impl Unpin for ConsentState
impl UnsafeUnpin for ConsentState
impl UnwindSafe for ConsentState
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